React-select: Select multi, close dropdown when clicking selecting option - v1.0.0-rc.2

Created on 23 Sep 2016  路  7Comments  路  Source: JedWatson/react-select

Hello,

Is there an option to change the default behavior that if _multi_ is set to _true_ the dropbox is closed once an option has been selected? Currently, if _multi_ is _true_ the dropbox remains open unless I click outside of the Select component.

Thanks

Most helpful comment

You can try setting autoBlur={true} property.

All 7 comments

You can try setting autoBlur={true} property.

Thanks Ivan! That works like a charm ...

thank you i also struggled a bit

You can try setting autoBlur={true} property.

You can try setting autoBlur={true} property.

Hello,

I am using ant design . Is there an option to change that if multi is set to true the dropbox is need to be closed once an option has been selected Currently,
if multi is true the dropbox remains open unless I click outside of the Select component.

closeOnSelect & autoBlur is not working correctly to close the dropdown after making selection.

Thanks
Venkat

autoBlur doesn't seem supported anymore, what's the way now?

There's a prop that you can pass to your dropdown - closeMenuOnSelect={true}. Although it is true by default, so on selection your dropdown should get close. Generally to avoid auto close we use closeMenuOnSelect={false}. Check if this works for you. eg-