浏览代码

original option not available to formatSelection on init

The original option isn't available to formatSelection when initializing the selection from a select[multiple]
brettmas 12 年之前
父节点
当前提交
c577158599
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1790,7 +1790,7 @@
 
                     var data = [];
                     element.find(":selected").each2(function (i, elm) {
-                        data.push({id: elm.attr("value"), text: elm.text()});
+                        data.push({id: elm.attr("value"), text: elm.text(), element: elm});
                     });
 
                     if ($.isFunction(callback))