Saturday, 31 August 2013

ExtJS Panel item listener of click event only fires once

ExtJS Panel item listener of click event only fires once

the select listener is only firing once.Than returns and appended property
of firing: false on the second click. How can I prevent this from
happening?
xtype: 'combo',
store: ds,
displayField: 'title',
typeAhead: false,
hideLabel: true,
hideTrigger:true,
anchor: '100%',
minChars: 1,
listConfig: {
loadingText: 'Searching...',
emptyText: 'No matching buildings found.',
// Custom rendering template for each item
getInnerTpl: function() {
return '<div class="search-item">{name}</div>';
}
},
pageSize: 10,
// override default onSelect to do redirect
listeners: {
'select': function(combo, selection) {
console.log('you there?');
var building = selection[0];
if (building) {
retrieveBuildingInfo(Ext.String.format(env_url +
'building.php?id={0}', building.get('id')));
}
},
'expand': function() {
Ext.Msg.alert("test","do you see me");// this
alert never show, when the combo expanded
console.log(this.events.select);
}
}

No comments:

Post a Comment