-
-
Notifications
You must be signed in to change notification settings - Fork 39
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] Fix type for multiple values to use readonly arrays #55
Comments
@mnajdova I'm not sure what you mean by moving the "current" useAutocomplete in Material UI:
|
Thanks for creating the issue @pcorpet. To give some clarification, at this moment Material UI uses the |
This will allow us to iterate on the base's useAutocomplete types and only release to Material UI when stable enough. See #39727
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.
@mnajdova is mui/material-ui#39738 what you had in mind for the first steps? |
Steps to reproduce 🕹
The following should work
Current behavior 😯
Typescript complains that the value is an immutable array.
Expected behavior 🤔
accept it.
Context 🔦
A fix was proposed in mui/material-ui#38253 and got merged, it got reverted in mui/material-ui#38253 because of mui/material-ui#38817.
The steps proposed by @mnajdova were to
Your environment 🌎
No response
The text was updated successfully, but these errors were encountered: