-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Bug: search + getOptions bug #107
Comments
I am getting the same issue and the Enter event worked for me too, the clicking is not working too. |
Me too, please fix this |
Seems to be an issue from 2.0.4 onward |
Still having this issue. Should I just install an older version? |
@davidangel please what is the solution to this? |
@davidangel just use https://www.npmjs.com/package/react-select instead. It's better than this so I just switched my thing to that. Easy switch too |
Investigating the onMouseDown trigger the difference is that when you do a search the value of the option is undefined. So when you do send e.target.value down to onSelect it's undefined. To fix this I set the value manually and still trigger the event for all the other stuff (close on click, ie) |
I am currently using a beta version (https://github.com/andreymoser/react-select-search/releases/tag/v2.0.6-beta-107) which is working good, it's based on @davidangel 's PR (#108) with minor changes, but I guess we will have to dig up it a lit bit more to have confidence that this fix is good. 🚀 |
@maidul98 react-select depends on the big Emotion library. If you care about performance, it's not a good choice. |
Sorry for the delay and thanks @davidangel for the bugfix. I've merged it (just tweaked it a bit to work with numeric values) into master. Can be tested here https://react-select-search.com/?path=/story/async--fetch . Published a patch v2.1.1. @andreymoser Nice! Let me know if you found anything else that is included in your fixes that I've missed. |
CodeSandbox Reproduction: https://codesandbox.io/s/react-select-search-bug-29g70?file=/src/App.js
When utilizing
search
and a customgetOptions
method, it seems that clicking a result doesn't set the value, but that keyboard navigating with theEnter
key does set the value.The text was updated successfully, but these errors were encountered: