Skip to content
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

[Autocomplete] Type multiple values with readonly arrays. #38253

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

pcorpet
Copy link
Contributor

@pcorpet pcorpet commented Jul 31, 2023

There is no reason to mutate the array once passed as a prop or when sending it to onChange.

@mui-bot
Copy link

mui-bot commented Jul 31, 2023

Netlify deploy preview

https://deploy-preview-38253--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 4fca0c0

There is no reason to mutate the array once passed as a prop or when sending it to onChange.
@pcorpet pcorpet force-pushed the readonly-array-value branch from 5e16c69 to 4fca0c0 Compare July 31, 2023 22:00
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Aug 1, 2023
@zannager zannager requested a review from michaldudak August 1, 2023 11:57
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 We don't intend to mutate props, so the change you're proposing looks ok.

@pcorpet
Copy link
Contributor Author

pcorpet commented Sep 4, 2023

Thanks @michaldudak , what's the next step to get this merged?

@michaldudak
Copy link
Member

Nothing else is needed from your side. We'll include it in the release this week.

@michaldudak michaldudak merged commit 5d8f213 into mui:master Sep 4, 2023
@pcorpet pcorpet deleted the readonly-array-value branch September 4, 2023 07:56
mnajdova added a commit that referenced this pull request Sep 6, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Sep 8, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Sep 8, 2023
xcode-it pushed a commit to xcode-it/material-ui that referenced this pull request Sep 11, 2023
pcorpet added a commit to pcorpet/material-ui that referenced this pull request Nov 3, 2023
There is no reason to mutate the array once passed as a prop or when sending it to onChange.

This is a second attempt of mui#38253, but not affecting Material UI package. See #39727 for context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants