I have a list of documents. Each document has a customer attribute that is determined to belong .
When a user changes a client in one of the documents, I want to show in the counter the number of documents that have been changed. And when the user decides that he will click the "Publish" button, which will save the client client changes to the api.
DS.Model in ember 2.13 has parameters ( https://emberjs.com/api/data/classes/DS.Model.html ):
hasDirtyAttributes, dirtyType
Both of them do not respond to changes in belongsTo / HasMany by Ember design.. I saw a lot of answers on this topic, but I don’t see any isDirty () method for the model in the 2.13 documentation or any .send ("getDirty") method for manually setting the document model in a dirty state? I also saw some plugins / mixins for older versions of Ember.
But my question is: how do the creators of Ember “advise / advise / best practice” to deal with this. Is there any basic solution / manual solution that does not require a third-party addon? How, for example, using an onchange observer for each relationship in the model? Or a computed property with @ each.dirtyType for child models (or even a set of child elements will not be marked as dirty itself?)?
What is the sandbox solution for Ember 2.13?