Say I have a hasMany relationship Procedure => hasMany Steps, with async:true, and I have a Procedure Component (on the procedure route) called procedure-main, which lists t
You should still use @each
stepsStatusObserver: Ember.observer('steps.@each.stepStatus', function(){
...
})
The problem is that steps.[].stepStatus is not a valid dependent key anymore. You should replace it by steps.@each.stepStatus.
Here is a summary of valid and invalid dependent keys in current Ember versions:
array - this observes if the array reference itself changes, e.g replacing the entire array with another value or array such as that oldValue !== newValue.array.[] - this observes both when the array itself changes (above) and when the array length changes (functionally equivalent of array.length)array.@each.property - observes both cases above and when property of some of the array's items changearray.@each.{prop,anotherProp} - you can also observe multiple properties while specifying only one key. This expands to array.@each.prop and array.@each.anotherProp.array.@each - isn't valid anymore, no trailing @each. Use .[] instead.array.@each.property.property - Also not valid. Note that @each only works one level deep. You cannot use nested forms like todos.@each.owner.name or todos.@each.owner.@each.name.array.[].property - not valid anymore. Use @each form instead.