@trudb/tru-common-lib 0.2.212 → 0.2.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7761,19 +7761,21 @@ class TruDataGrid {
|
|
|
7761
7761
|
}));
|
|
7762
7762
|
}
|
|
7763
7763
|
this.subs.push(this.connectionHub.subscribe(this.dataContext, this.config.resultConfig.entityType, this.config.resultConfig.entityType.name, this.addEntity, this.getRowData, () => { return this.latestSetupQuery; }, this.config.resultConfig.expands, [], () => { return true; }).subscribe((dataChange) => {
|
|
7764
|
+
let rowNodesToDelete = [];
|
|
7764
7765
|
dataChange.dataChanges.forEach((change) => {
|
|
7765
7766
|
if (change.changeOperation === 'D') {
|
|
7766
|
-
let rowNodeToDelete = null;
|
|
7767
7767
|
this.api.forEachNode(function (rowNode) {
|
|
7768
|
-
if (rowNode.data.$entity.Ref === change.tableRef)
|
|
7769
|
-
|
|
7768
|
+
if (rowNode.data.$entity.Ref === change.tableRef) {
|
|
7769
|
+
rowNode.data.$entity.entityAspect.setDetached();
|
|
7770
|
+
rowNodesToDelete.push(rowNode);
|
|
7771
|
+
}
|
|
7770
7772
|
});
|
|
7771
|
-
if (rowNodeToDelete)
|
|
7772
|
-
this.api.applyTransaction({ remove: rowNodeToDelete });
|
|
7773
7773
|
}
|
|
7774
7774
|
else if (change.changeOperation === 'I') {
|
|
7775
7775
|
}
|
|
7776
7776
|
});
|
|
7777
|
+
if (rowNodesToDelete.length)
|
|
7778
|
+
this.api.applyTransaction({ remove: rowNodesToDelete });
|
|
7777
7779
|
this.api.refreshCells({ force: true });
|
|
7778
7780
|
}));
|
|
7779
7781
|
this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
|