Normalized select2-selecting
event
This normalizes the `select2-selecting` event so the object is returned as `choice` in the event data. While the documentation points to the name being `object`, all other events return the affected data object as `choice`. This closes the following issue: https://github.com/ivaynberg/select2/issues/2340
This commit is contained in:
parent
b13c9b474d
commit
9e17f63013
@ -1124,7 +1124,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
|
||||
// abstract
|
||||
triggerSelect: function(data) {
|
||||
var evt = $.Event("select2-selecting", { val: this.id(data), object: data });
|
||||
var evt = $.Event("select2-selecting", { val: this.id(data), object: data, choice: data });
|
||||
this.opts.element.trigger(evt);
|
||||
return !evt.isDefaultPrevented();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user