View Full Version : Ext.form.ComboBox removes all the values automatically when selected any item

28 Jun 2011, 5:43 AM

I've made a combo box and its working fine except when I select one of the items in the combobox, it removes all other values in it. here is a peace of code:

var comboitemarray = new Array();
for(var comboitems=0;comboitems<listitems.length;comboitems++){
comboitemarray[comboitems] = listitems[comboitems].item;
dynamicformfield = new Ext.form.ComboBox({
id: fieldname,
fieldLabel: fieldlabel,
name: fieldname,
editable: false,
autoSelect : true,
store: comboitemarray,
queryMode: 'local',

Any idea ?or Im missing anything here ?



28 Jun 2011, 6:18 AM
I'm having a similar issue with Combo boxes triggering the 'select' event of other Combos.

28 Jun 2011, 8:58 AM
Set the config option
triggerAction: 'all' on the combobox. It's not actually removing the other options, but filtering the combobox to only show those items starting with the currently selected item. I must admit I don't understand why the ExtJS default is to behave in this rather useless way: I always find myself specifying triggerAction: 'all' for combos.