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

Add a prop to determinate if filterText should be cleared after selection #677

Open
alexfranco90 opened this issue Apr 4, 2024 · 0 comments

Comments

@alexfranco90
Copy link

Hi,

right now the value in filterText is cleared after a selection but it can be usefull, expecially in multi-selection mode, to not clear the current filter so users can select multiple items from list without the need of re-typing the filter.
I propose to add a new prop, similar to clearFilterTextOnBlur, to determine if clearing or not the value in filterText when a selection happens.

In this moment the clearing of the filter happen in L493

filterText = '';

I think it is enough to add a check at this point in the code based on a "prop" to determine the desired behavior.
Similar to how it is already done during blur event.

Right now, I'm working around this issues by binding filterText and automatically set the previous value when the library try to clear it. But it's not a clean solution because it triggers multiple changes to the underling list and a flickering of the items in the list.

If you want I can open a PR for this.

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

1 participant