ember-layout
ember-layout copied to clipboard
make Ember.LayoutState#parentView property volatile
Properties are cached by default when Ember.CP_DEFAULT_CACHEABLE
is true, which will be the default in Ember 1.0
This causes the parentView
property to never change, causing content
to be set on the incorrect view on subsequent changes leading to blank sections.
This change just makes the parentView
property volatile.
+1 I've just stumble on that one. Nice catch!
Another solution is to make parentView depends on parentState.view:
parentView: Ember.computed(function() {
var state = this.get('parentState');
while(state && !state.get('view')) {
state = state.get('parentState');
}
return state && state.get('view');
}).property('parentState.view')