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

Provide a "controlled" searchable dropdown #545

Open
ScopeyNZ opened this issue Nov 3, 2021 · 0 comments
Open

Provide a "controlled" searchable dropdown #545

ScopeyNZ opened this issue Nov 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ScopeyNZ
Copy link
Contributor

ScopeyNZ commented Nov 3, 2021

Right now, the search functionality in dropdowns is "uncontrolled" meaning that an implementation needs to handle the event of the user typing in the search box, and narrow down the options themselves. This is useful when you want to do some custom search behaviour (like loading from an API), but is a little verbose for the commonly used search functionality.

While it can be trivial to get the search working, it can be more nuanced to solve problems like filtering out already selected items when searching for others.

Ideally theres a SearchDropdown component or something that just implements a common text search on the existing items in the dropdown, and can handle the gotcha of retaining already selected items in search results.

@ScopeyNZ ScopeyNZ added the enhancement New feature or request label Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant