I have an autocomplete, but the values of it are more than 30,000 and if the user writes only to the page in the browser for.
Here I have tried to add a condition: if it is more than 3 letters, represent the autocomplete and if it is less, not represent anything, but the autocomplete system stops working completely:
var value = $('#tags').val();
if (value.length > 3 && value != "Search...") {
$( "#tags" ).autocomplete({
source: availableTags
});
}
});
The problem is that it returns a huge amount.
Try limiting the number of results:
Note: Taken from this StackOverflow answer