-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force drop-down menu to open #110
Comments
That should work: <Select ref={(ref) => { if (ref) { ref.focus(); } } } /> Are you sure some other component isn't grabbing the focus? |
Yes, I am pretty sure that no other component grabs the focus. What I am trying to do, is to force the drop down menu to open, when clicking a selection in mulit-select setup. Normally, the drop-down menu will open when a selection bubble is clicked, but I am employing the
|
I see. And does this happen even if your |
Yes, it happens with whichever body the method has, even if the method has no body at all. I suppose, the Specifically, I need to capture the entire value of the selected bubble (which, in my case contains additional data such as label, level etc) and update the result list of the select accordingly. I currently hold 3 different lists of results, and depending on which select bubbled was clicked, I will display the corresponding list. So, I am afraid that building a common event listener on this item's clicks, would not pass the complete |
Ah, yes, setting that prop (passed through to the Since this behavior is consistent with the upstream react-select project, it's a #wontfix on our end. |
Yes, I have tried manually calling
|
Looks like it's a timing issue, which you can see simply replicated here: https://codepen.io/TrevorBurnham/pen/LQjjrb Focusing an element during a |
Yes, that was it. Thank you so much for your time! |
Hello,
What's the procedure of calling focus() function? I have tried referencing the component via ref attribute but I had no luck in succeeding.
The text was updated successfully, but these errors were encountered: