X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fform%2FComboBoxArray.js;h=0569f25efa397427899a9aa6506a3f380b2d5f8e;hb=229f28a9419846aeb3734049436bdf8b202f68c2;hp=1a71d82a642445425a901108b90ce40a533c50d0;hpb=36e49b0e943bc8151585f594e1b66de61758cdba;p=roojs1 diff --git a/Roo/form/ComboBoxArray.js b/Roo/form/ComboBoxArray.js index 1a71d82a64..0569f25efa 100644 --- a/Roo/form/ComboBoxArray.js +++ b/Roo/form/ComboBoxArray.js @@ -37,6 +37,13 @@ Roo.form.ComboBoxArray = function(config) { this.addEvents({ + /** + * @event beforeremove + * Fires before remove the value from the list + * @param {Roo.form.ComboBoxArray} _self This combo box array + * @param {Roo.form.ComboBoxArray.Item} item removed item + */ + 'beforeremove' : true, /** * @event remove * Fires when remove the value from the list @@ -230,7 +237,7 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField, var valueField = this.combo.valueField; var displayField = this.combo.displayField; if (this.items.indexOfKey(rec[valueField]) > -1) { - Roo.log("GOT " + rec); + //console.log("GOT " + rec.data.id); return; } @@ -461,6 +468,7 @@ Roo.extend(Roo.form.ComboBoxArray.Item, Roo.BoxComponent, { if(this.cb.disabled){ return; } + this.cb.items.remove(this); this.el.child('img').un('click', this.remove, this); this.el.remove();