-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[material-ui][TextField][FormLabel][InputLabel][FormControl] Use exact children type to allow React children type augmentation #38872
Conversation
Netlify deploy previewhttps://deploy-preview-38872--material-ui.netlify.app/ Bundle size report |
Hey, just wanted to check in on this. |
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.
This looks good. Let's remove the test though. We can do this change to allow React type augmentation.
packages/mui-material/test/typescript/reactAugmentation/children.spec.tsx
Outdated
Show resolved
Hide resolved
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.
@nicegamer7 I have applied the expected changes by removing the test. Looks good now, thanks!
Thanks for taking care of this! |
…t children type to allow React children type augmentation (mui#38872) Co-authored-by: ZeeshanTamboli <[email protected]>
This PR fixes some inconsistencies with the typings of some of the MUI Material components, which led to type errors when the React children type was augmented. There may be more of these inconsistencies that I missed.
react-i18next is an example package that augments React's types, allowing objects to be passed as children. Without these changes, several react-i18next users were experiencing type-errors (i18next/react-i18next#1543 (comment)) related to the Autocomplete component.