Переглянути джерело

Make tags matching case insensitive

This closes https://github.com/select2/select2/issues/3566
This closes https://github.com/select2/select2/pull/4509
Yaron Uliel 9 роки тому
батько
коміт
cb9a904578
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      src/js/select2/data/tags.js

+ 4 - 1
src/js/select2/data/tags.js

@@ -53,7 +53,10 @@ define([
           }, true)
         );
 
-        var checkText = option.text === params.term;
+        var optionText = (option.text || '').toUpperCase();
+        var paramsTerm = (params.term || '').toUpperCase();
+
+        var checkText = optionText === paramsTerm;
 
         if (checkText || checkChildren) {
           if (child) {