-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[pickers] Gracefully handle textField.slotProps
#18980
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
Conversation
Deploy preview: https://deploy-preview-18980--material-ui-x.netlify.app/ Bundle size report
|
textField.slotProps
gracefullytextField.slotProps
packages/x-date-pickers/src/internals/components/PickerFieldUI.tsx
Outdated
Show resolved
Hide resolved
? { | ||
slotProps: { | ||
...other?.slotProps, | ||
input: (ownerState: FieldOwnerState) => ({ |
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.
Would it work with the resolveComponentProps
utility function instead?
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.
I've updated the solution to use resolveComponentProps
.
Also made some other fixes testing various cases and added some tests to ensure at least a semi-stability of this tricky and fragile behavior (until we drop support for Material v5).
Besides, it looks like this now solves #14284 as well. 🎉
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.
Big cleanup here! 💙
Fix #14684.
Fix #14284.
Apply this proposal: #14684 (comment)