我想按数组而不仅仅是单个值过滤存储,我正在使用 filterBy 但它不起作用。你能帮我吗?
var properties = rec.get('properties').split(',');
var store = this.getPropertyStore().load();
store.clearFilter(false);
store.filterBy(function(record, id) {
return Ext.Array.contains(properties, record.get("idProperty"));
});
负载是异步的,把过滤器放到加载事件中:
var store = this.getPropertyStore().load();
store.clearFilter(false);
store.on('load',function(){
store.filterBy(function(record, id) {
return Ext.Array.contains(properties, record.get("idProperty"));
});
})