瀏覽代碼

support null, undefined, false for data() to unselect. fixes #273

Igor Vaynberg 13 年之前
父節點
當前提交
f2460a826e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -2077,6 +2077,7 @@
                      .map(function() { return $(this).data("select2-data"); })
                      .get();
             } else {
+                if (!values) { values = []; }
                 ids = $.map(values, function(e) { return self.opts.id(e)});
                 this.setVal(ids);
                 this.updateSelection(values);