Skip to content

Commit b87a208

Browse files
committed
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(); });
1 parent 5619531 commit b87a208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
return;
360360
}
361361

362-
if (q === '' || q.length < that.options.minChars) {
362+
if (q.length < that.options.minChars) {
363363
that.hide();
364364
} else {
365365
that.getSuggestions(q);

0 commit comments

Comments
 (0)