You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the real issue (as shown in the Twiddle) is that this.notifyPropertyChange doesn't update observers in children. From my reading on similar issues that have been filed, that appears to be a design decision. That feels wrong though. I would have expected this.notifyPropertyChange to update all observers.
It also seems odd that there is no way to delete keys from an ember object that will trigger all observers. We have getters and setters, but no 'deleters'...
As @christophermlne mentioned, the notification is effectively being "absorbed" and since the actual selected item does not change the inner option-item is never going to consider selected as changed. This is an intentional choice, but I can absolutely see how you might think it is a bug.
Soon there will be alternative ways to do this sort of thing (e.g. emberjs/rfcs#410) which will be much more intuitive.
Closing for now, since this doesn't seem to be a bug (though again I totally agree that this is non-obvious behavior)....
Reproduced at https://ember-twiddle.com/5cdc151106ba73d08ce4f5da63c0736e?numColumns=2&openFiles=templates.components.my-comp.hbs%2Ctemplates.components.option-item.hbs
remove
button string changes toadd
in the same component templateremove
button doesn't update in children components (bug)Deleting a key on an
Ember.Object
correctly updates the template on the current component, but fails to update the templates of children components.The text was updated successfully, but these errors were encountered: