Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material-UI Autocomplete popup menu won't stay open

With Reactjs I'm using Material UI (core v4.12.3, lab 4.0.0-alpha.60) autocomplete which has been set up as a multiselectible drop down and I'm having trouble keeping the menu open. Whenever an option is selected the popup menu closes and I have to manually open it again just to select another option.

I have already set disableCloseOnSelect={true} But it still doesn't work

Looking around i think the issue might be linked to the fact I use onChange to save the selected values to state. Is there any workaround to getting disableCloseOnSelect to work? I think one way might be to handle open/closing the menu manually via saving to state but since I have several of these drop downs it doesn't seem good to manage the state for all of them

like image 895
CaptainObv Avatar asked Oct 18 '25 17:10

CaptainObv


1 Answers

<Autocomplete
  disableCloseOnSelect
/>

This is the property you need ;)

like image 190
f v Avatar answered Oct 20 '25 08:10

f v