所以,我collection在 mydgrid和storeis 类型中使用[Memory, Trackable]。我正在使用商店过滤(如此处给出)。当我过滤存储数据时,返回的集合对象没有任何数据属性,因此我无法访问集合中的数据。虽然,当我更改集合时,更改会反映在 d-grid 中,但我需要访问集合中的数据来做其他事情。
这是我的代码:
var filterObj= new this.store.Filter();
var tagFilter= filterObj.in('tagList', selectedTags);
var newCollection= this.store.filter(tagFilter);
this.grid.set('collection', newCollection);
我无法data从newCollection. this.grid.collection我在这里做错了吗?