support null, undefined, false for data() to unselect. fixes #273
This commit is contained in:
parent
08bf83f1a4
commit
f2460a826e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user