Ensure changes are created in sync
This commit is contained in:
parent
52eb72d94f
commit
77bd77e625
|
@ -882,13 +882,13 @@ DataModel.enableChangeTracking = function() {
|
||||||
Change.attachTo(this.dataSource);
|
Change.attachTo(this.dataSource);
|
||||||
Change.getCheckpointModel().attachTo(this.dataSource);
|
Change.getCheckpointModel().attachTo(this.dataSource);
|
||||||
|
|
||||||
Model.on('changed', function(obj) {
|
Model.afterSave = function afterSave(next) {
|
||||||
Model.rectifyChange(obj.getId(), Model.handleChangeError);
|
Model.rectifyChange(this.getId(), next);
|
||||||
});
|
}
|
||||||
|
|
||||||
Model.on('deleted', function(id) {
|
Model.afterDestroy = function afterDestroy(next) {
|
||||||
Model.rectifyChange(id, Model.handleChangeError);
|
Model.rectifyChange(this.getId(), next);
|
||||||
});
|
}
|
||||||
|
|
||||||
Model.on('deletedAll', cleanup);
|
Model.on('deletedAll', cleanup);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue