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

Match not exactly #561

Open
leonardlan opened this issue Jul 24, 2018 · 1 comment
Open

Match not exactly #561

leonardlan opened this issue Jul 24, 2018 · 1 comment

Comments

@leonardlan
Copy link

Hi! Is it possible to match but not exactly? So typing @rn, the suggestion list is Ron, Roman, Ryan? Thanks! I got the idea from Sublime Text's overlay command palette. Super useful, btw. Wondering if there is a web equivalent.

@dixon
Copy link

dixon commented Aug 1, 2018

You could probably override the filter callback to achieve what you're wanting.

The default one just checks that the query (i.e. typed text) is contained within your data items' searchKey:

_results.push item if ~new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()

Overriding that to look for the letters you're typing anywhere in the data items might work.

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

2 participants