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

Option for custom sort in autocomplete #115

Closed
ChildishGiant opened this issue Apr 27, 2021 · 2 comments
Closed

Option for custom sort in autocomplete #115

ChildishGiant opened this issue Apr 27, 2021 · 2 comments
Labels
Milestone

Comments

@ChildishGiant
Copy link
Member

ChildishGiant commented Apr 27, 2021

Currently you can specify a custom "sortFunction" but this only controls which element wins in a 1v1 matchup, not how the matchups are made (Currently just uses array.sort). Adding this would allow end users to use libraries such as fuse.js to do more complex sorting and make results more accurate.

@ChildishGiant
Copy link
Member Author

I have a functioning PR, just working on docs for it. This'd be a 2.0.0 feature as sortFunction has been renamed to compareFunction to avoid confusion and that would be a breaking change. I could always just keep it as sortFunction but having a sortFunction and customSort that do different things is rather confusing.

@wuda-io
Copy link
Member

wuda-io commented Feb 21, 2023

Can be done now with the new onSearch Function. #261

@wuda-io wuda-io closed this as completed Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants