From 9ecce5af7c75fffad9f62d7ea8429db203328894 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Mon, 28 May 2012 15:15:51 -0700 Subject: [PATCH] support numeric text keys in local data. fixes #68 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 1238e3d7..1c3d1b3f 100755 --- a/select2.js +++ b/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;