Hello Perhaps could you help me to understand: I have a computed like this in my controller :
isBtnSaveDisabled: computed(
'model.hasDirtyAttributes',
function() {
// CODE
}
).readOnly()
When I update an attribute (DS.attr) in my model , this computed is not called ( isBtnSaveDisabled is present in my template!).
BUT, If I rewrite this computed like this :
isBtnSaveDisabled: computed(
'model.currentState.isDirty',
function() {
// CODE
}
).readOnly()
It works
!? Why ? hasDirtyAttributes is a computed which depends of currentState.isDirty ? I don’t understand…
I forgot to specify: we use Ember 3.12 (an update is planned but not immediately)
And if I exec $E.get('model.hasDirtyAttributes')in my js console ( $E is my controller) , my first computed works (the computed with model.hasDirtyAttributes)…
Strange
!
Thanks for your help.