Skip to content

Commit 7d49e7c

Browse files
committed
Fixes server side change tracking while object is not in edit mode
1 parent 340722c commit 7d49e7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Libs/Vidyano/persistent-object.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,14 @@
338338
if (result instanceof PersistentObject)
339339
result = result._lastResult;
340340

341-
this._lastResult = result;
342-
343341
const changedAttributes: PersistentObjectAttribute[] = [];
344342
let isDirty = false;
345343

344+
if (!this.isEditing && result.attributes.some(a => a.isValueChanged))
345+
this.beginEdit();
346+
347+
this._lastResult = result;
348+
346349
this.attributes.removeAll(attr => {
347350
if (!result.attributes.some(serviceAttr => serviceAttr.id === attr.id)) {
348351
delete this.attributes[attr.name];

0 commit comments

Comments
 (0)