We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf5e7d1 commit 0160b36Copy full SHA for 0160b36
1 file changed
select2.js
100644
100755
@@ -1,4 +1,4 @@
1
-/*
+/*
2
Copyright 2012 Igor Vaynberg
3
4
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in
@@ -484,6 +484,7 @@
484
});
485
query.callback(data);
486
487
+ // this is needed because inside val() we construct choices from options and there id is hardcoded
488
opts.id=function(e) { return e.id; };
489
} else {
490
if (!("query" in opts)) {
@@ -1303,7 +1304,7 @@
1303
1304
throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
1305
}
1306
- index = indexOf(selected.data("select2-data").id, val);
1307
+ index = indexOf(this.id(selected.data("select2-data")), val);
1308
1309
if (index >= 0) {
1310
val.splice(index, 1);
0 commit comments