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

feat: add clear search field functionality on item select #767

Open
wants to merge 1 commit into
base: dev-5.x
Choose a base branch
from

Conversation

Sujalkumar12
Copy link

@Sujalkumar12 Sujalkumar12 commented Oct 23, 2024

Hey @hossein-zare ,

I noticed that there’s currently no functionality to clear the search field after selecting an item when both multiple and searchable are true.

I recently implemented this feature in my project, and I believe it would be a valuable addition to our package as well. I also found some open issues related to this functionality:

Issue #622
Issue #750

In this PR, I’ve added a new prop called clearSearchFieldOnSelect. This will clear the search field if the following conditions are met:

  1. clearSearchFieldOnSelect should be true
  2. multiple (picker) should be true
  3. search field should not be empty

If all conditions are satisfied, clearSearchFieldOnSelect will clear the search field.

Please let me know if you have any feedback or if there are any changes needed!

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.

1 participant