metonym / svelte-typeahead

Accessible, fuzzy search typeahead component
https://metonym.github.io/svelte-typeahead
MIT License
222 stars 18 forks source link

feat: add `showDropdownOnFocus` prop #55

Closed metonym closed 2 years ago

metonym commented 2 years ago

Closes #54

By default, the dropdown will be shown if value yields results. There are use cases (#54) where an initial search value may be set without the intention of immediately showing the dropdown.

This backwards-compatible change adds a showDropdownOnFocus prop that will only show the dropdown if the search input is focused, regardless of whether the current value has results.