reset : function()
{
//Roo.form.ComboBoxArray.superclass.reset.call(this);
- this.items.each(function(f) {
- f.remove();
- });
+ this.items.clear();
+
this.el.dom.value = '';
if (this.hiddenEl) {
this.hiddenEl.dom.value = '';
return;
}
- this.cb.items.remove(this);
- this.el.child('img').un('click', this.remove, this);
- this.el.remove();
- this.cb.updateHiddenEl();
+ if(false !== this.cb.fireEvent('beforeremove', this.cb, this)){
+ this.cb.items.remove(this);
+ this.el.child('img').un('click', this.remove, this);
+ this.el.remove();
+ this.cb.updateHiddenEl();
+
+ this.cb.fireEvent('remove', this.cb, this);
+ }
- this.cb.fireEvent('remove', this.cb, this);
}
});
\ No newline at end of file