Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Did @each changed?

$
0
0

@ofridagan wrote:

Hi,

I’m pretty sure that in old ember (low 2.x), doing something like

function(){...}.property('arr.@each.x')

was always “stronger” than doing:

function(){...}.property('arr')

i.e with the @each dependency whenever some object was added to the array OR the array itself changed - the property would trigger its getter.

After upgrading, I noticed that defining a arr.@each.x dependency won’t trigger a property change when the array itself changes. Even worse, adding the two dependencies together doesn’t work!!!

I created some twiddles to clearify:

  1. A working example with just 'arr' - working twiddle
  2. Not working using 'arr.@each.x'- @each not working
  3. Not working even after adding back 'arr' dependency - still not working

Did anyone else noticed that? what would be the solution if I want a recalculation of the property if either the array itself changes OR something inside it?

BTW, I think this changed in Ember 2.7… but I see nothing in the release notes…

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles