소스 검색

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);