@trudb/tru-common-lib 0.2.280 → 0.2.282
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.
|
@@ -7827,8 +7827,14 @@ class TruDataGrid {
|
|
|
7827
7827
|
});
|
|
7828
7828
|
if (!entityAlreadyInGrid) {
|
|
7829
7829
|
let enhancedEntity = this.enhanceRowDataForEntity(entity);
|
|
7830
|
-
|
|
7831
|
-
|
|
7830
|
+
if (changeArgs.entity.Ref < 0) {
|
|
7831
|
+
this.rowData.push(enhancedEntity);
|
|
7832
|
+
this.api.applyTransaction({ add: [enhancedEntity], addIndex: 0 });
|
|
7833
|
+
}
|
|
7834
|
+
else {
|
|
7835
|
+
this.rowData.unshift(enhancedEntity);
|
|
7836
|
+
this.api.applyTransaction({ add: [enhancedEntity] });
|
|
7837
|
+
}
|
|
7832
7838
|
}
|
|
7833
7839
|
}
|
|
7834
7840
|
}));
|
|
@@ -7951,6 +7957,7 @@ class TruDataGrid {
|
|
|
7951
7957
|
}
|
|
7952
7958
|
return false;
|
|
7953
7959
|
};
|
|
7960
|
+
//Can possibly merge with similar logic in onEntityAdded() observable above
|
|
7954
7961
|
addEntity = (newEntity, dataNotification = false) => {
|
|
7955
7962
|
let entityAlreadyInGrid = false;
|
|
7956
7963
|
this.api?.forEachNodeAfterFilter((rowNode) => {
|