我最近从 4.1.3 切换到 4.2.1。我有一个带有复选框模型的网格。当用户选择或取消选择记录时,应用程序会选择(或取消选择)所有基于公共记录属性值的相关记录。这工作得很好,但是,迁移后,停止工作。当我在 FB 上查看时,我可以看到两个事件被触发(选择和取消选择)
var exSelectionModel = Ext.create('Ext.selection.CheckboxModel', {
checkOnly: false,
viewConfig: {
listeners: {
beforecellmousedown: function(view, cell, cellIdx, record, row, rowIdx, eOpts){
}
}
},
listeners: {
selectionchange: function(sm, selections) {
console.log(selections);
},
select: function( sm, record, index, eOpts ){
var blockId = record.data.blockId;
var blockRecords = sm.getStore().queryBy(function(rec){
return rec.data.blockId == blockId;
var records = new Array();
Ext.each(blockRecords.items, function(bRec){
records.push(bRec);
});
sm.select(records,true,true);
},
deselect: function( sm, record, index, eOpts ){
var blockId = record.data.blockId;
var blockRecords = sm.getStore().queryBy(function(rec){
return rec.data.blockId == blockId;
});
var records = new Array();
Ext.each(blockRecords.items, function(bRec){
records.push(bRec);
});
sm.deselect(records,true,true);
}
}
});
Ext JS 4.2.1 从 4.1.3 有什么变化吗