From fa4ce8e3826c14ec24a535f987b9cd9b3312f0c2 Mon Sep 17 00:00:00 2001 From: jdecuyper Date: Tue, 3 Sep 2013 23:29:42 -0500 Subject: [PATCH] Enable function formatResultCssClass. --- select2.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 2869656c..9abdf489 100644 --- a/select2.js +++ b/select2.js @@ -948,7 +948,6 @@ the specific language governing permissions and limitations under the Apache Lic }); // this is needed because inside val() we construct choices from options and there id is hardcoded opts.id=function(e) { return e.id; }; - opts.formatResultCssClass = function(data) { return data.css; }; } else { if (!("query" in opts)) { @@ -3154,7 +3153,7 @@ the specific language governing permissions and limitations under the Apache Lic sortResults: function (results, container, query) { return results; }, - formatResultCssClass: function(data) {return undefined;}, + formatResultCssClass: function(data) {return data.css;}, formatSelectionCssClass: function(data, container) {return undefined;}, formatNoMatches: function () { return "No matches found"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); },