-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Better Filtering Option #3067
Comments
This is perfect, thank you! |
Currently, there seems to be no way for custom filtering + sorting, for example if I want to use matchSorter, except for like this:
Is there a better option? |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version. If you aren't using the latest version of However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you! |
For eg. If my options contain the label "Red face and eyes". while searching on the field, if user type "red face", an option with "Red face and eyes" appears. However, If the user input is "red eyes" then it shows no options. I tried this option and option from the issue below, but still not working. Is there any option to search for options by word or similar solution for my case. Thanks. |
By default the built in filterOption uses
indexOf
which is not very useful for end-users searching for multi word matches.Throwing a string Fuzzy matching library at this may help with this, but the ones I looked at all required the entire list of options, not getting them one at a time like this lib provides.
I ended up writing a tiny custom filter that worked far better for our users, and created a wrapper so I could import that each time rather than having to always add it in. Sharing it here in case it helps anyone else, and I'd be happy to do a PR to update the default filtering (with options and all) if desired.
The text was updated successfully, but these errors were encountered: