-
Notifications
You must be signed in to change notification settings - Fork 82
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
onFocus is not exposed for overridden #88
Comments
Hi @quockhanhle93, What you can do is to toggle the dropdown using For example: https://codesandbox.io/s/open-on-top-w1yr0 handleKeyDownFn signature is: |
Hi @sanusart, That sounds great to use Anyway, it is good so far. Thanks for your great helps. |
Hey yes I know. It is kind of triking the component visually only. We can see how your use case can be handled more properly. The example above is obviously a simple one. |
Thanks @sanusart, let me open this discussion a little bit. :) We try to improve current user experience. In fact, we have a form of more than 10 dropdowns, it is fine to click on each dropdown to open and choose from the list of options. However, we are encouraging users on using Tab (working with keyboard is much faster than mouse click) to switch and control the input. There are some issues:
We are looking around for finding a suitable dropdown, and realize that your repository is best fit to our need. It is appreciated to have this feature, not just for Thanks a lot. |
Hey @quockhanhle93 I'll look into how to make it happend, unfortunately did not took this kind of case into account with all possible triggers happening now, so it may take some time to re-factor. Thanks for taking time to describe. |
Thanks @sanusart for understanding our situation. Thanks for spending your time on helping me. |
@quockhanhle93 Any chance you can test in your setup using the branch in PR? codesandbox autogenerates a temp package for each PR: |
… closes issue #88 (#90) * FIX (keyboard navigation): fix tab navigation from outside * CHORE (examples): cleanup basic example * v4.4.0 See changelog: https://github.com/sanusart/react-dropdown-select/blob/master/CHANGELOG.md
Should be available since v4.4.0 |
Thanks a lot @sanusart It sounds a great help. Thanks. |
Hi there,
We are currently using the react-dropdown-select in our project. Is it possible to override the onFocus Function of index.js line 486?
We would really appreciate to handle it by ourselves because we do not want the dropdown to open automatically on focus but will receive a :focus pseudoclass, or handle some styling. We just want to open the dropdown on pressing Enter on keyboard.
Thank you and best wishes
Khanh
The text was updated successfully, but these errors were encountered: