You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reset selected index to 0 when filtering search #83
would it make sense to reset the selected index in the js file to 0 after searching for a command or dependency?
Scenario
A user starts typing and, scrolls up and down in provided list and then continues typing to narrow the search.
Outcome
In case the selected index is now out of bounds of the search result list, nothing is highlighted and you need to hit up to reach a selected item.
Improvement
Would it make sense to have a deterministic behaviour as in either the index gets reset to 0 after reach search or alternatively if the current selected index is out of bounds of the search result list at least?
I am open to create a PR if you'd like and we agree on an implementation.
Activity
PhiloNL commentedon Jun 4, 2022
That makes sense; I think it's good to reset the selected index to 0. If you want to open a PR, that would be great. Thanks!