-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Only fetch on typing and show results on focus #223
Comments
Hello @stell, Unfortunately, there's no way I'm aware of in the current version would help you do that. On the other hand, such behavior would be easily achievable in the new release v10 since there is an API for controlling the
Cheers, and have a nice day! :) |
Sounds nice. Will check it when 10 is out. Thanks! |
Hello @stell, v10.0.3 is out now and the behavior you've asked about is now easily achievable using it as shown below.
// autoComplete.js Config Options
events: {
input: {
focus: () => {
const inputValue = document.querySelector("#autoComplete").value;
if (input.length) autoCompleteJS.start();
},
},
}, Please try it and let me know how it goes. Cheers! :) |
This works just fine:
|
Hi there,
when using:
the result fetching is done every time. But if someone only types in a few chars, fetching is done and then he removes from focus and gets back into focus the fetching is done again, without being necessary, because nothing changed.
Is it possible to only fetch on typing and display already fetched results on focus?
The text was updated successfully, but these errors were encountered: