我试图在beginupdate Ext.data.BufferedStore中停止事件:
Ext.define('BufferedStoreGrid', {
extend: 'Ext.data.BufferedStore',
xtype: 'BufferedStoreGrid',
storeId: 'Store',
pageSize: Constants.countRowGrid,
model: "ComboModel",
leadingBufferZone: false,
trailingBufferZone: false,
autoLoad: false,
proxy: {
type: 'rest',
reader: {
rootProperty: 'data'
}
}
, listeners: {
beginupdate: function (eOpts) {
console.log('beginupdate');
if (this.proxy.reader.rawData) {
if (this.proxy.reader.rawData.data) {
if (this.proxy.reader.rawData.data.length === 0) {
return false; // <-- this freeze grid
}
}
}
}
}});
网格冻结时如何正确地做到这一点?