React-select: Force drop-down menu to open

Created on 8 Feb 2018  路  2Comments  路  Source: JedWatson/react-select

Hello,

I followed the advice Jed gave regarding force opening the drop-down menu but I couldn't figure how to do it. I have opened a thread on Stackoverflow, but so far I haven't received any answers.

What's the procedure of calling focus() function? I have tried referencing the component via ref attribute but I had no luck in succeeding.

categorquestion

Most helpful comment

for future googlers: you can also use defaultMenuIsOpen={true}

All 2 comments

If it's for debug purposes, I managed to force it by changing the internal state.isOpen through the React Chrome plugin

In my case I wanted to tweak the CSS and needed to focus on the container (Select-menu-outer) to change its CSS.

react-select-state

for future googlers: you can also use defaultMenuIsOpen={true}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MalcolmDwyer picture MalcolmDwyer  路  3Comments

coder-guy22296 picture coder-guy22296  路  3Comments

x-yuri picture x-yuri  路  3Comments

batusai513 picture batusai513  路  3Comments

ericj17 picture ericj17  路  3Comments