-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[autocomplete] Fix ArrowLeft crash when value is not set with single-value rendering #47214
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 ArrowLeft crash when value is not set with single-value rendering #47214
Conversation
…dd unit test cases
Netlify deploy previewhttps://deploy-preview-47214--material-ui.netlify.app/ Bundle size report
|
Ensure focus is only attempted when value exists in ArrowLeft handler Remove optional chaining as it's not needed after null check
|
Yes @ZeeshanTamboli. Will do this |
|
@ZeeshanTamboli I tried pushing the empty commit but the CI is not getting triggered |
|
Hmm, I tried again but those two particular CI jobs aren't running. |
ZeeshanTamboli
left a comment
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.
@rithik56 We re-tried the netlify build+cleared the cache and the CI is passing now. I had made a few changes in the code. Looks good now. Thanks for the pull request.
Fixes #47212
fix(Autocomplete): prevent error when focusing non-existent element
Add optional chaining when focusing elements in useAutocomplete to handle cases where the element doesn't exist. Add tests to verify the behaviour