我有一个带有指定dstore / Memory存储的dojo dgrid
_instance = new Memory({ data: { identifier:'monthNumeric', items: [] } });当我单击网格的标题时,我看到排序箭头更改,但没有更改网格中的内容。
我查看了代码,看到它构建了一个排序对象。 然后它从_StoreMixins.js调用此代码
_applySort: function () { if (this.collection) { this.set('collection', this.collection); } else if (this.store) { console.debug('_StoreMixin found store property but not collection; ' + 'this is often the sign of a mistake during migration from 0.3 to 0.4'); } },集合的设置似乎创建了一个排序函数,但它实际上并没有执行它。
这应该怎么样?
(我不知道它是否重要,但是同一个商店也被用在Dojo图表中,包含在DStoreAdapter中。但这不是它在这里使用的方式)
I have a dojo dgrid with an assigned dstore/Memory store
_instance = new Memory({ data: { identifier:'monthNumeric', items: [] } });When I click on the header of the grid, I see the sort arrow change, but no changes to contents in grid.
I traced through the code, ans see it build a sort object. Then it calls this code from _StoreMixins.js
_applySort: function () { if (this.collection) { this.set('collection', this.collection); } else if (this.store) { console.debug('_StoreMixin found store property but not collection; ' + 'this is often the sign of a mistake during migration from 0.3 to 0.4'); } },the setting of the collection seems to create a sort function, but it does not actually execute it.
How is this supposed to work?
(I don't know if it matters, but the same store is also being used with a Dojo chart, wrapped in a DStoreAdapter. But that is not how it is being used here)
最满意答案
dgrid 1.1.0在setCollection的刷新周围添加了_started检查
由于我从未在网格上进行过启动,因此未设置。 一旦我开始启动,一切都按预期工作
dgrid 1.1.0 added a check for _started around the refresh in setCollection
Since I never did a startup on the grid, this was not set. Once I caled startup, everything worked as desired
更多推荐
发布评论