Skip to content
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

Enable setting the first option in the list as active. #1796

Closed
wants to merge 2 commits into from

Conversation

Joshuan92
Copy link

No description provided.

@famoser
Copy link

famoser commented Apr 21, 2022

When the user types into the search bar, the first item is always highlighted. When the user then uses backspace (for example, to correct a typo), the same item stays highlighted even though it may not be the top-most item anymore. This is arguably confusing UX.

For example, the user types "Anna", highlighting the person named Anna. Then the user uses backspace to correct a typo. When the user pressed backspace twice (resulting in "An" as a search query), Anna remains highlighted even though there could be many more persons before (for example "Anastasia").

This option opts-in to always highlight the first element in the search results, independent of whether the user used backspace or not.

@github-actions
Copy link
Contributor

This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

@famoser
Copy link

famoser commented Sep 21, 2022

Could the maintainers please indicate whether they intend to review/merge this, or should I close this PR? This is still a concern from my point of view. Thanks!

Copy link
Contributor

@risadams risadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dist files should not be modified here. they will be reset during a build

}
}
// activate
self.hasOptions = results.items.length > 0 || ( has_create_option && self.settings.showAddOptionOnCreate ) || self.settings.setFirstOptionActive;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: We should look at a cleanup of these if checks into something that is both easier to understand as a dev, and avoids edge cases

CHORE (testing, documentation): Do you have any updates to unit tests or an example that can show the expected behavior?

risadams added a commit that referenced this pull request Sep 22, 2022
risadams added a commit that referenced this pull request Sep 22, 2022
@risadams
Copy link
Contributor

copied and merged in #1874

@risadams risadams closed this Sep 22, 2022
@famoser
Copy link

famoser commented Sep 23, 2022

Thank you a lot @risadams !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants