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

RFC: Multiple Search Dropdown -> not clearing search query on select #1954

Closed
creedmangrum opened this issue Aug 11, 2017 · 2 comments
Closed

Comments

@creedmangrum
Copy link

This isn't a bug as the code is intentional, but I'm curious as to why in the search dropdown if multiple items are allowed, why the search query is not cleared on enter of item click? I would be happy to help out and make this a prop option, unless you would say otherwise. It seems like something useful as I can't really think of a use case for leaving the searchQuery after select, though I'm sure there are some. If this would be something that would help, happy to contribute, just want to make sure that I wouldn't be totally off base.

Thanks for all your work on this!

Steps

search for an item on multi select, then select an item that matches

Expected Result

i would expect the search query to be cleared

Actual Result

search query remains. it is due to

    if (!multiple) this.clearSearchQuery();

that is in both on enter and item click.

Version

0.71.4

@levithomason
Copy link
Member

tl;dr When selecting many options with the same query required, you have to enter after every selection. Since it poses no usability issues keeping the query, we've defaulted to this option.

For more, see #1795 (comment)

handleItemClick

This currently resets the query when an menu item is made active, however, I have always found this to be a usability issue with multiple dropdowns. When there are lots of items, it is often more helpful to keep the query while clicking items. Otherwise, the user has to enter the same query over and over for every item. Example, selecting all states that start with ma:

http://g.recordit.co/OqqnZDHR5u.gif

Will move the discussion to the PR.

@AndrewCi
Copy link

I believe there was a regression somehow and this issue should be re-opened #4063 @levithomason @creedmangrum

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

No branches or pull requests

3 participants