-
Notifications
You must be signed in to change notification settings - Fork 931
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
Controlling what happens onBlur #577
Comments
I believe you did not create any boundaries for your last item. Even if you click outside, it will select the last element. If you were clicking outside, Downshift should reset by triggering the mouseUp state I do not know how to tab out. |
Looks like I can figure out what I want to do with Only pain point is that there is no access to It seems like you could capture the currently highlighted option when they call |
I think the workarounds are sufficient for this scenario. Make sure to checkout this example as well: https://codesandbox.io/s/github/kentcdodds/downshift-examples/tree/master/?module=%2Fsrc%2Fordered-examples%2F03-typeahead.js&moduleview=1 |
If the user tabs out of the drop down, it always selects the last selected item - even if they've completely typed out a different value.
I think it would be beneficial to add another function that deals with what to do when the focus leaves the component (either because of tabbing out or clicking outside). I am looking at using it in two different spots, and in one case I want to just select the first prediction on blur, in another - I want to just leave what they typed.
The text was updated successfully, but these errors were encountered: