Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Empty input (all spaces) isn't counted in minChars
  • Loading branch information
Faisal Feroz committed Oct 20, 2022
commit 1c00c94a7860ace3e5ecce3cc6bded7649b293a1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/*.xml
/bower_components
/node_modules/*
.DS_Store
package-lock.json
4 changes: 2 additions & 2 deletions dist/jquery.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
},
Expand Down Expand Up @@ -493,7 +493,7 @@
return;
}

if (query.length < options.minChars) {
if (query.trim().length < options.minChars) {
that.hide();
} else {
that.getSuggestions(query);
Expand Down
Loading