Open lucasjans opened 12 years ago
Our standard save method calls GetDirtyGraph() so only dirty entities are sent to the server during a call to Save.
Look at line 346 in this file (ignore the comment on line 345 I need to remove that as it is not slow) https://github.com/EntitySpaces/entityspaces.js/blob/master/Src/BaseClasses/EsEntityCollection.js
So how do I get notified of a dirty element on the graph? I can extend fields, but I can't extend isDirty.
What's the best way to detect when an esEntity is dirty and automatically saving it to the server?
I've created a simple extension to monitor and changes and update them call save.
And I can extend any object that is a column. Here's an example to save when the name is changed
But what I would really like to do is extend the "isDirty." Problem is, by the time it exists, it's already returned to the viewModel. I would rather not have to dynamically for-each through the viewModel after the data is applied to extend it. Is there a better way?
When I look in here:
isDirty still doesn't exist.