@trudb/tru-common-lib 0.2.275 → 0.2.277
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.
|
@@ -7643,6 +7643,7 @@ class TruDataGrid {
|
|
|
7643
7643
|
rowCount = 'Rows: 0';
|
|
7644
7644
|
selectedRowCount = 'Selected: 0';
|
|
7645
7645
|
gridOptions = {
|
|
7646
|
+
getRowId: (params) => { return params.data.$entity.Ref.toString(); },
|
|
7646
7647
|
context: {
|
|
7647
7648
|
grid: this
|
|
7648
7649
|
},
|
|
@@ -7787,6 +7788,13 @@ class TruDataGrid {
|
|
|
7787
7788
|
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) => {
|
|
7788
7789
|
let rowNodesToRemove = [];
|
|
7789
7790
|
dataChange.dataChanges.forEach((change) => {
|
|
7791
|
+
if (change.changeOperation === 'U') {
|
|
7792
|
+
this.api.forEachNode((rowNode) => {
|
|
7793
|
+
if (rowNode.data.$entity.Ref === change.tableRef) {
|
|
7794
|
+
rowNodesToRemove.push(rowNode.data);
|
|
7795
|
+
}
|
|
7796
|
+
});
|
|
7797
|
+
}
|
|
7790
7798
|
if (change.changeOperation === 'D') {
|
|
7791
7799
|
this.api.forEachNode((rowNode) => {
|
|
7792
7800
|
if (rowNode.data.$entity.Ref === change.tableRef) {
|
|
@@ -7804,7 +7812,7 @@ class TruDataGrid {
|
|
|
7804
7812
|
// Merge this logic with addEntity() logic below
|
|
7805
7813
|
// Three ways to add: Directly via toolbar, signalR, or listen for entity added event
|
|
7806
7814
|
this.subs.push(this.dataContext.onEntityAdded().subscribe((changeArgs) => {
|
|
7807
|
-
if (!changeArgs.entity
|
|
7815
|
+
if (!changeArgs.entity)
|
|
7808
7816
|
return;
|
|
7809
7817
|
let entity;
|
|
7810
7818
|
if (this.gridType === TruDataGridTypes.DetailManyToMany)
|