Skip to content

Reset selected index to 0 when filtering search #83

Description

@manuelsteiner

Hi,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions