[autocomplete] Fix ArrowLeft crash when value is not set with single-value rendering
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
Netlify deploy preview
https://deploy-preview-47214--material-ui.netlify.app/
Bundle size report
| Bundle | Parsed size | Gzip size |
|---|---|---|
| @mui/material | 🔺+9B(0.00%) | 🔺+3B(0.00%) |
| @mui/lab | 0B(0.00%) | 0B(0.00%) |
| @mui/system | 0B(0.00%) | 0B(0.00%) |
| @mui/utils | 0B(0.00%) | 0B(0.00%) |
Generated by :no_entry_sign: dangerJS against 499839a36d661b7fca7b2a8bd824b2e3b49f3714
@rithik56 Can you try to push with an empty commit? I am not sure why the two required jobs e2e-website and deploy/netlify aren't running in the CI. Same is the case in #47215.
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.