Autocomplete delay option is not honoured
$(algoliaConfig.autocomplete.selector).each(function (i) {
var options = {
dropdownMenuContainer: "#algolia-autocomplete-container",
debug: algoliaConfig.autocomplete.isDebugEnabled,
delay: 400,
minLength: 2
};
$(this).autocomplete(options, sources);
});
Since this is just a jQuery UI autocomplete widget, I would expect all of the options supported here https://api.jqueryui.com/autocomplete/ to also apply on the Algolia autocomplete component, including delay
However when we set up our widget with the config above, the delay: 400 is ignored, and requests are sent to the server immediately on key stroke. Wondering if this is expected behaviour, or something we can easily control to minimise unnecessary network usage?
I would expect it to work more like the following: https://www.plus2net.com/jquery/msg-demo/autocomplete-delay.php
jquery is one thing, jqueryui is another.
You want to set debounce 400 on your dataset object. Like sources[0].debounce = 400
Autocomplete v0 has been in low maintenance mode for a few years and we just released Autocomplete v1 so I'm closing this.
Resources