Merge pull request #1774 from avelis/master
Fix for #1518. Update to select2.js to trigger properly named event.
This commit is contained in:
commit
58f939ef3b
12
select2.js
12
select2.js
@ -2883,9 +2883,17 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
this.setVal(val);
|
||||
if (this.select) this.postprocessResults();
|
||||
}
|
||||
selected.remove();
|
||||
|
||||
this.opts.element.trigger({ type: "removed", val: this.id(data), choice: data });
|
||||
var evt = $.Event("select2-removing");
|
||||
evt.val = this.id(data);
|
||||
evt.choice = data;
|
||||
this.opts.element.trigger(evt);
|
||||
|
||||
if (evt.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
|
||||
this.triggerChange({ removed: data });
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user