sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
218 stars 82 forks source link

How to auto hover over the first result? #28

Closed minhok1 closed 2 years ago

minhok1 commented 3 years ago

Hey this library's really great!

Just a question though - how can I make the first result highlighted by default so that when I press enter, that result gets selected automatically? I'd also like to navigate using arrow keys, so similar issue here as #26 as well.

Thanks!

sickdyd commented 2 years ago

Hello @minhok1,

the arrow keys navigation is not yet implemented. It can take some work to pull off, but I've added it to my todo list. So for now highlighting the first result and selecting it with return is not available. I will keep you posted.

sickdyd commented 2 years ago

@minhok1 RSA v6.1.1 supports key navigation! And the first element is automatically selected.