Explorar o código

support numeric text keys in local data. fixes #68

Igor Vaynberg %!s(int64=13) %!d(string=hai) anos
pai
achega
9ecce5af7c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;