-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SelectUnstyled] Improve exported types #30895
Conversation
@@ -29,7 +29,7 @@ export interface SelectUnstyledCommonProps { | |||
componentsProps?: { | |||
root?: React.ComponentPropsWithRef<'button'> & SelectUnstyledComponentsPropsOverrides; | |||
listbox?: React.ComponentPropsWithRef<'ul'> & SelectUnstyledComponentsPropsOverrides; | |||
popper?: React.ComponentPropsWithRef<typeof PopperUnstyled> & | |||
popper?: Partial<React.ComponentPropsWithRef<typeof PopperUnstyled>> & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is Partial
required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Popper requires an open
prop, but it's not necessary to provide it here in componentsProps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, could we leave an comment for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it's done!
<SelectUnstyled | ||
componentsProps={{ | ||
root: { | ||
// @ts-expect-error - requires module augmentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have test for the module augmentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we do 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesomeness :D
👋 The migration PR has been merged. Please follow these steps to make sure that the contents are all updated. (Sorry for the inconvenience)
If you are struggle with the steps above, feel free to tag @siriwatknp |
Part of #30870