-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
focus() is erroneously called 50ms after the user has selected a new value #442
Comments
I'm interested by such a use case. I use react-select as a global Facebook-like searchbar, that the user uses to change of page. Right now, the select is automatically refocused, which is extremly weird for the user. I'm still on the 0.6 version, since I don't support React 0.14 yet. So perhaps my comment is outdated :) |
We have a similar use case and this behavior has turned into a UX issue on our end because we'd like to move focus to elements which are created on change, rather than keep it on the original select component. |
This post is a few months old, but to be clear this is present in the 1.0.0 beta. |
It has been fixed in the v1.0.0-beta9, with the autoblur prop! At least it works for me :) |
@AugustinLF good to know I'll update my beta version and see if that helps. Thanks! |
Version 1 of react-select is no longer supported. In the best interest of the community we've decided to spend the time we have available on the latest version. We apologise for any inconvenience. Please see: |
When the user selects an item in the dropdown, the focus is returned to the dropdown in a settimeout(50).
In my scenario, when the user selects something, I want to create a new field somewhere on the page and focus it, but there's no way to do that without resorting to an ugly setTimeout()
I'm not sure whether this behavior is by design or not. SetValue is called with no second parameter, and this is interpreted as focusAfterUpdate=true (see commented code below)
It's easy to fix my use case by calling setValue(value, false) instead of setValue(value)
Shall I submit a Pull Request, or is there a good reason to keep this behavior ?
The text was updated successfully, but these errors were encountered: