ember.js: [3.13] Regression in computed property computation
The last commit updates Ember to 3.13. When typing in the input, nothing happens.
The previous commit uses 3.12 and there, when typing in the checkbox, in the console a number of things happen - the computed property’s get is called and the value is also propagated to the “parent” component/controller.
This is a bug/regression.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (12 by maintainers)
Yes, I believe @rwjblue and @pzuraq fixed it in #19028.
I’ve been talking with @rwjblue about this. Here’s a PR that adds a test to the Ember Codebase documenting the failure: https://github.com/emberjs/ember.js/pull/19028.
Per Robert, he’s located the cause, working on a solution.
in 3.12, this is what happens:
Ember.set(child, 'a', 'foo')Ember.setcallsnotifyPropertyChange(child, 'a')notifyPropertyChangecallsdependentKeysDidChangedependentKeysDidChangeultimately causesnotifyPropertyChange(child, 'value')to be callednotifyPropertyChangefor a value that was passed in to a component calls that componentsPROPERTY_DID_CHANGEmethodEmber.Component.prototype[PROPERTY_DID_CHANGE]implements the two way binding behaviors, and ultimately callsEmber.set(parent, 'string', 'foo')In 3.13+ there is no such thing asdependentKeysDidChangeIF we had callednotifyPropertyChange(child, 'value')the parent’s property would have been mutated properly, but we just don’t call it (since no code exists to do it)