PDA

View Full Version : listener on iconcombo doesn't works



maax
21 Apr 2010, 2:18 AM
If I replace the xtype with 'combo', listeners works !

Any Idea ?

Thanks





{
xtype : 'iconcombo',
hiddenName: 'origine',
fieldLabel: 'Pays d\'origine',
store: storeCountry,
valueField:'cou_id',
typeAhead: true,
displayField:'cou_name',
iconClsField: 'cou_flag',
mode: 'remote',
forceSelection: true,
resizable:true,
triggerAction: 'all',
emptyText:'Saisir le pays...',
selectOnFocus:true,
listeners: {

// 'change' will be fired when the value has changed and the user exits the ComboBox via tab, click, etc.
// The 'newValue' and 'oldValue' params will be from the field specified in the 'valueField' config above.
change: function(combo, newValue, oldValue){
console.log("Old Value: " + oldValue);
console.log("New Value: " + newValue);
},

// 'select' will be fired as soon as an item in the ComboBox is selected with mouse, keyboard.
select: function(combo, record, index){
console.log(record.data.name);
console.log(index);
}
}

jay@moduscreate.com
21 Apr 2010, 4:35 AM
iconcombo is not an Ext JS component.