提交 5eed28ce 编写于 作者: C Catouse

* add deselected param to change event for chosen single select control.

上级 6eceded6
......@@ -1113,12 +1113,18 @@ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
};
Chosen.prototype.results_reset = function() {
var oldValue = this.form_field_jq.val();
this.reset_single_select_options();
this.form_field.options[0].selected = true;
this.single_set_selected_text();
this.show_search_field_default();
this.results_reset_cleanup();
this.form_field_jq.trigger("change");
var newValue = this.form_field_jq.val();
var changeData = {selected: newValue};
if (oldValue !== newValue && !newValue.length) {
changeData.deselected = oldValue;
}
this.form_field_jq.trigger("change", changeData);
if(this.active_field) {
return this.results_hide();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册