-
Notifications
You must be signed in to change notification settings - Fork 621
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
close by click on open dropdown #1012
Comments
You can implement this using hideDropdown. |
i have already tried this. unfortunately it did not work, because it is not possible to check from the outside if the dropdown is open or not. |
Why is that necessary? You can run Regardless, you can check whether it's open or not by accessing |
In order to close the dropdown menu, a listener must be made on the click event of the input. Then this is triggered not only when closing but also when opening. Thus, a check must be made so that it can be decided what happens. In my first attempt, I have checked for css classes, then the dropdown menu would be opened and instantly closed again (by the double click event). Thus, with their property will also not be possible. |
Hi, I use this setup as workaround - it closes on change and makes it possible to use choices well with a mobile device.
|
I facing the same problem. Here my code:
The problem is, that Choices-Js will close the dropdown and then reopen it. Tried to wait with On Touch Devices it is frustrating to not know how to close the select. @lieto-dk solution is not ok for me because i'm handling a multi select. Everytime reopening it is bad. |
…after selection is made. Choices-js#636 Choices-js#973 Choices-js#1012
Is your feature request related to a problem? Please describe.
In order for users to be able to use the dropdown even better (especially on the mobile view), a feature is needed that closes the dropdown when clicked.
Describe alternatives you've considered
https://react-select.com/home
The text was updated successfully, but these errors were encountered: