1

私はemberjs-dataを使用しています

allProcessPointsAreLoaded:(->
@get("reportDefinition.virtualColumns").everyProperty("processPoint.isLoaded", true)
).property("reportDefinition.virtualColumns.@each.processPoint.isLoaded")

processPoint.isLoaded が true に変更されたときに、プロパティが更新されません。何かご意見は?

4

2 に答える 2

1

最新の ember-data には、各フィールドだけでなく、コンテンツ コレクション全体の isLoaded プロパティがあります。私の見解では、パス「controller.content.isLoaded」を監視して、すべてのコンテンツがいつそこにあるかを判断します。

于 2012-08-10T14:25:23.797 に答える
0

@each は現在、ネストされたプロパティを 1 つしかサポートできず、サポートできないと思い"reportDefinition.virtualColumns.@each.processPoint"ます"reportDefinition.virtualColumns.@each.processPoint.isLoaded"。これが私が見つけたgithubの問題です。

プロパティをプロキシに isLoaded に追加することで、この問題を回避しました。したがって、次のようなものになります。

processPointLoaded: function() {return this.get('processPoint.isLoaded')}.property('processPoint.isLoaded')

それが役立つことを願っています!

于 2012-08-16T01:22:48.837 に答える