1
選擇偵聽器僅觸發一次。返回和附加屬性爲 點火:假 第二次點擊。我怎樣才能防止這種情況發生?單擊事件的面板項偵聽器僅觸發一次
這裏有一個例子:http://supraliminalsolutions.com/pages/example-apps/campusBuildings/
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);
}
}
我有一個工具欄中的組合相同的問題。調用'this.reset()'保持選擇監聽器,但組合框顯示一個空值... –