2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-14 01:04:06 +00:00

Removing empty query validation on value change

Removing empty query validation on value change, so I can set 'minChars' to 0 and show suggestions when the user click on input.

Exemple:

var $autocomplete = new $.Autocomplete($('#wishlist_name')[0], {
	lookup: wishlist_types,
	minChars: 0,
});

$('#wishlist_name').focus(function(){
	$autocomplete.onValueChange();
});
This commit is contained in:
Eric Saboia 2013-01-25 18:18:26 -02:00
parent 56195317c8
commit b87a208066

View File

@ -359,7 +359,7 @@
return; return;
} }
if (q === '' || q.length < that.options.minChars) { if (q.length < that.options.minChars) {
that.hide(); that.hide();
} else { } else {
that.getSuggestions(q); that.getSuggestions(q);