Pārlūkot izejas kodu

support numeric text keys in local data. fixes #68

Igor Vaynberg 13 gadi atpakaļ
vecāks
revīzija
9ecce5af7c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -262,7 +262,7 @@
      */
     function local(options) {
         var data = options, // data elements
-            text = function (item) { return item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
+            text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
 
         if (!$.isArray(data)) {
             text = data.text;