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
[fields] Fix usage of slotProps.textField.InputProps
#8428
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-8428--material-ui-x.netlify.app/ Updated pagesNo updates. These are the results for the performance tests:
|
slotProps.textField.InputProps
textFieldProps.inputProps = { ...textFieldProps.inputProps, ...inputProps }; | ||
textFieldProps.InputProps = { ...textFieldProps.InputProps, ...InputProps }; |
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 don't see reason to say it's a bad pattern, but it's the first time I see a mutation in React code
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.
For me it's OK because we know that the object is generate on useSlotProps
above, so the location is locale (it has no impact before line 28 and after line 38.
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'm not sure to get why modifying the single input range and not the multi input
@alexfauquette because the conflict is between props received by the field at the top level (e.g: So no need to do any manual merge, it's always the slot |
Part of #8322