Skip to content

Commit cb9a904

Browse files
yaronulielkevin-brown
authored andcommitted
Make tags matching case insensitive
This closes select2#3566 This closes select2#4509
1 parent 563198a commit cb9a904

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/select2/data/tags.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ define([
5353
}, true)
5454
);
5555

56-
var checkText = option.text === params.term;
56+
var optionText = (option.text || '').toUpperCase();
57+
var paramsTerm = (params.term || '').toUpperCase();
58+
59+
var checkText = optionText === paramsTerm;
5760

5861
if (checkText || checkChildren) {
5962
if (child) {

0 commit comments

Comments
 (0)