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

Add option for not selecting first list item by default, unselect with arrow keys #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pjsier
Copy link

@pjsier pjsier commented Mar 11, 2017

  • Adds selectByDefault option that defaults to true, but if set to false it won't select the first item in a result list automatically.
  • Allows users to submit input with the enter key that is not a list item even if results are displayed.
  • Setting it to false also allows users to unselect items in a list by moving outside the bounds of a result list with the arrow keys.

The use case for this came from having Horsey in a search field where I wanted people to be able to have autocomplete as a shortcut, but also be able to submit more general queries and get redirected to a page with results. For the example this would be just pressing enter to search for all results containing "apple" rather than having to pick one of the displayed options with "apple" in it.

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.

None yet

1 participant