2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-09-19 16:59:01 +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
/bower_components
/node_modules/*
.DS_Store
package-lock.json

View File

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

File diff suppressed because one or more lines are too long

View File

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