Home > Mobile >  How to Remove Focus after selecting Items from the Options in React Material UI
How to Remove Focus after selecting Items from the Options in React Material UI

Time:05-05

I have linked a code sandbox sample program Sample Program, here we can notice once we select an item from the options still it is in a focused state, but I don't want it to get focused after selecting an option.

Can Someone please help on this to overcome this problem, Thanks in Advance :)

CodePudding user response:

Add blurOnSelect prop to Autocomplete

<Autocomplete
    {...otherProps}
    blurOnSelect    // <== Here
/>

From Mui Autocomplete Documentation:
https://mui.com/material-ui/api/autocomplete :

blurOnSelect: 'mouse' | 'touch' | bool
Default: false

  • Related