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:
parent
8138252b4c
commit
1c00c94a78
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@
|
||||
/*.xml
|
||||
/bower_components
|
||||
/node_modules/*
|
||||
.DS_Store
|
||||
package-lock.json
|
||||
|
4
dist/jquery.autocomplete.js
vendored
4
dist/jquery.autocomplete.js
vendored
@ -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);
|
||||
|
2
dist/jquery.autocomplete.min.js
vendored
2
dist/jquery.autocomplete.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user