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
importDidChangeAttrsfrom'ember-did-change-attrs';exportdefaultEmber.Component.extend(DidChangeAttrs,{didChangeAttrsConfig: {attrs: ['email','isAdmin']},didChangeAttrs(changes){if(changes.email){letoldEmail=changes.email.previous,newEmail=changes.email.current;// Do stuff}}});
The text was updated successfully, but these errors were encountered:
The biggest concern I had about this API when I looked at it was regarding inheritance. What would happen if someone wanted to extend a component that was using DidChangeAttrs and use it themself? Specifically around the didChangeAttrsConfig.
We could:
Say sorry, it's not supported
Make it a concatenatedProperties and/or mergedProperties
Originally started: workmanw/ember-diff-attrs#4 .
Rough out of the API provided by @GavinJoyce :
The text was updated successfully, but these errors were encountered: