[Autocomplete] clearOnBlur
is not working
#28752
Labels
bug 🐛
Something doesn't work
component: autocomplete
This is the name of the generic UI component, not the React module!
v5.x migration
Current Behavior 😯
On Autocomplete with
multiple
enabled,clearOnBlur
doesn't work as the docs say it should: "Set tofalse
if you want to help the user resume his search."Expected Behavior 🤔
The Autocomplete's input field should not clear on blur or option select when
clearOnBlur
is set to false, even when the Autocomplete component has themultiple
option enabled. If the docs say that it helps the user resume his/her search, the input should not be cleared on blur, no matter the type of Autocomplete.Steps to Reproduce 🕹
Steps:
clearOnBlur={false}
is set on all three Autocompletes.Context 🔦
I've been utilizing
onInputChange
,inputValue
, andonChange
to accomplish this behavior, but it's extremely laggy and slow because my dropdown has a lot of options. Reducing the number to only 100 usingfilterOptions
hasn't done much to help, but theclearOnBlur
would handle everything I'm manually handling inonInputChange
andinputValue
much more cleanly.Your Environment 🌎
@emotion/react -- latest (11.4.1)
@emotion/styled -- latest (11.3.0)
@mui/material -- latest (5.0.2)
react -- latest (17.0.2)
react-dom -- latest (17.0.2)
Chrome 94.0.4606.61
The text was updated successfully, but these errors were encountered: