-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[Autocomplete] Prevent shrink animation in controlled Autocomplete when initial value
is provided
#45734
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] Prevent shrink animation in controlled Autocomplete when initial value
is provided
#45734
Conversation
…lete to consume initial valueProp
Netlify deploy previewhttps://deploy-preview-45734--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
useAutocomplete
to consume initial valueProp
value
value
value
value
value
is provided
Thanks for the help @ZeeshanTamboli with the updates.. Super neat! Do let me know if I can be of any help with the changes! |
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.
Great work on this, @imadx! Thanks for your contribution. Just made some updates.
Cherry-pick PRs will be created targeting branches: v6.x |
…tocomplete when initial `value` is provided (#45734) Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
value
is providedvalue
is provided
To address #45724, we can set
initialInputValue
onuseAutocomplete
to avoid shrinking its label when an initial value is already set.Fixes #45724
Before: https://stackblitz.com/edit/stackblitz-starters-bukupsze
After: https://codesandbox.io/p/sandbox/material-ui-cra-ts-forked-ct2y7y