فهرست منبع

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 8 سال پیش
والد
کامیت
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) {