Closed mmuric closed 9 months ago
I also have this bug.
If you do a fuzzy search and you find the one you want: Clicking on the result works as expected. However, if you use the keys to go down and then press Enter on the result, it will take the index on the results list but grab the index from the options lists.
index 0 from the results are not the same as index 0 from the options.
Fixed in v4.1.7 by https://github.com/tbleckert/react-select-search/pull/265
Describe the bug I'm using useSelect to create select box, and I encountered on the problem. When you try to search any word, and after that when you try to select option with up and down key, if you keep pressing down key highlight will disappear. Also, if you start pressing up/down key and try to select an option, it may result in a different selection.
To Reproduce
Expected behavior I expected that highlight will start over from top. And that I can select option that I want.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context I'm not 100% sure, but I think that in this line of code, instead of passing options, you should pass something like you return in snapshot.