I have a component in ember like
{{some-setup-section
processingOfId=processingOfId
savingActivitySetUp=savingActivitySetUp
editingActivitySetUp=editingActivitySetUp}}
and in my components js file
didUpdateAttrs() {
this.updateDataOnChange();
this._super(...arguments);}
I make use of didUpdateAttrs to find when some attribute have changed. In my case I need to exectue a function only when processingOfId
have changed. Is there any method like this.attrs('processingOfId').didChanged()
to help me solve my issue.
I tried
didUpdateAttrs({oldAttr, newAttr})
and check to see if oldAttr.someAttrs !== newAttr.someAttrs
value but in console it says ember doesn't encourage passing in attrs like that and soon its going to be depricated. Is there any way I can solve this scenario
To wrap up the question is there any way to find which attribute updated in the 'didUpdateAttrs' method inside a component
There is no in built way,
Refer this RFC for more information.
Some quick notes:
Refer addon README for usage