Skip to content

Commit 2cb4356

Browse files
committed
fixes select2#366
1 parent bdd7468 commit 2cb4356

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

select2.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,12 @@
12161216
}
12171217
}
12181218

1219-
if (search.val().length < opts.minimumInputLength && checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
1220-
render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
1219+
if (search.val().length < opts.minimumInputLength) {
1220+
if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
1221+
render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
1222+
} else {
1223+
render("");
1224+
}
12211225
return;
12221226
}
12231227
else {

0 commit comments

Comments
 (0)