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

Empty input (all spaces) isn't counted in minChars

This commit is contained in:
Faisal Feroz 2022-10-20 23:45:28 +05:00
parent 8138252b4c
commit 1c00c94a78
4 changed files with 7 additions and 5 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@
/*.xml /*.xml
/bower_components /bower_components
/node_modules/* /node_modules/*
.DS_Store
package-lock.json

View File

@ -226,7 +226,7 @@
that.fixPosition(); that.fixPosition();
if (that.el.val().length >= that.options.minChars) { if (that.el.val().trim().length >= that.options.minChars) {
that.onValueChange(); that.onValueChange();
} }
}, },
@ -493,7 +493,7 @@
return; return;
} }
if (query.length < options.minChars) { if (query.trim().length < options.minChars) {
that.hide(); that.hide();
} else { } else {
that.getSuggestions(query); that.getSuggestions(query);

File diff suppressed because one or more lines are too long

View File

@ -226,7 +226,7 @@
that.fixPosition(); that.fixPosition();
if (that.el.val().length >= that.options.minChars) { if (that.el.val().trim().length >= that.options.minChars) {
that.onValueChange(); that.onValueChange();
} }
}, },
@ -493,7 +493,7 @@
return; return;
} }
if (query.length < options.minChars) { if (query.trim().length < options.minChars) {
that.hide(); that.hide();
} else { } else {
that.getSuggestions(query); that.getSuggestions(query);