Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

ComboBox: Implement autocompletion #229

Open
sarahmonster opened this issue May 28, 2020 · 0 comments
Open

ComboBox: Implement autocompletion #229

sarahmonster opened this issue May 28, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sarahmonster
Copy link
Member

Per our docs:

By default, autocomplete is enabled for ComboBox components. This makes it easier for users to find the option they're looking for from a long or complex list of options. You can disable autocomplete, but that's only recommended for short lists (under seven items). It's generally best to leave enabled, since this allows users to choose the interaction method they're most comfortable with.

The search functionality returns all results, using fuzzy matching. This ensures that users can enter only part of a search term and still find the result they're looking for. For instance, searching a country list for "UK" or "U.A.E" should return "United Kingdom" and "United Arab Emirates", respectively, and "Arab" should return both "Saudi Arabia" and "United Arab Emirates".

When filtering a list by search term, the headings will disappear if all items beneath that heading are also hidden.

Right now, the ComboBox highlights results as you type into it, but doesn't hide the results (or headings!) that don't match the terms.

What we'll want to add here:

  • filter list of results (hide items with no matches)
  • highlight headings as well (all items underneath a highlighted heading should display)
  • hide headings with no matches underneath
  • implement fuzzy search matches
  • allow users to enable or disable autocomplete
  • set default placeholder based on whether autocomplete is enabled or not

There's definitely some hidden complexity in here, especially in terms of allowing fuzzy matches—we may need to provide some way of specifying "hidden" search terms or analogues for each item in a list.

Might be good to tackle in tandem with #228, although they're each probably complex enough to handle on their own!

@sarahmonster sarahmonster added the enhancement New feature or request label May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants