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

Search for 2 characters or less #327

Open
Robin481 opened this issue Aug 27, 2020 · 1 comment
Open

Search for 2 characters or less #327

Robin481 opened this issue Aug 27, 2020 · 1 comment
Assignees

Comments

@Robin481
Copy link
Member

For our project one of the tags used is only two characters long.

The problem is that the search bar only starts searching for results when it has at least three characters in the search field.
Meaning when I want to search for, let's say "sf" I am not able to do this because the search bar simply doesn't start a search below 3 characters, even when you press enter.

I am aware that searching for results that are shorter than 3 characters might incur a performance penalty, this could be avoided by not live searching below 3 characters but still starting 2 (or even 1) character searches when the user presses enter.
Similarly there could also be a wait period before searches below 3 characters are started. For example the user searches for "sf" and the live-search only starts when the user hasn't typed for 2 seconds, this would still allow a very similar live search but avoid some of the early performance hits.

@TheWalkingLeek
Copy link
Member

TheWalkingLeek commented Jun 24, 2021

Hey, thanks for reporting!

Approach

Keep the automatic search limit at 3 characters.
But implement an @onEnter function so that a search can be triggered manually. This will still only be triggered if the input value is empty

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