-
Notifications
You must be signed in to change notification settings - Fork 78
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
Implement fuzzy finder as default filter for Select/MultiSelect #162
Comments
Hi, I'm taking a stab at this as I really want to make use of it. I'm running into some decisions I would like your input on. I could implement a separate function like Alternatively, I would suggest changing the pub type Filter<'a, T> = &'a dyn Fn(&str, &T, &str, usize) -> bool; And give full access to the entire list of options pub type Filter<'a, T> = &'a dyn Fn(&str, &'a Vec<&T>) -> Vec<&'a T>;
// Alternatively mut ref
pub type Filter<'a, T> = &'a dyn Fn(&str, &'a mut Vec<&T>); This would allow users to implement whatever filter/ordering logic they want, as well as allowing the use of a default fuzzy filter. Lastly, it would be simple to add a feature flag enabling the fuzzy vs contains default filter that is currently in place allowing users to exclude the |
Since #176 is merged, could this be closed? |
Yes, thanks! I'll work over wrapping-up everything that's been merged into a release |
Is your feature request related to a problem? Please describe.
Fuzzy finder is very valuable, and I don't think it'd imply in a significant performance cost at runtime.
The text was updated successfully, but these errors were encountered: