@trudb/tru-common-lib 0.2.232 → 0.2.234
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.
|
@@ -4001,11 +4001,12 @@ class TruDetailViewBase {
|
|
|
4001
4001
|
newEntity = this.dataContext.entityAccess().add(this.entityType);
|
|
4002
4002
|
if (this.view.parentTableRefName)
|
|
4003
4003
|
newEntity[this.view.parentTableRefName] = this.entity[this.view.parentTableRefName];
|
|
4004
|
-
|
|
4005
|
-
|
|
4004
|
+
if (!dataNotification) {
|
|
4005
|
+
this.entities.unshift(newEntity);
|
|
4006
4006
|
this.setNavigationIndex(0);
|
|
4007
|
+
}
|
|
4007
4008
|
else {
|
|
4008
|
-
this.
|
|
4009
|
+
this.entities.push(newEntity);
|
|
4009
4010
|
}
|
|
4010
4011
|
};
|
|
4011
4012
|
onCloneEntity = () => {
|
|
@@ -7795,7 +7796,6 @@ class TruDataGrid {
|
|
|
7795
7796
|
this.subs.push(this.dataContext.onEntityAdded().subscribe((changeArgs) => {
|
|
7796
7797
|
if (!changeArgs.entity || this.isActive)
|
|
7797
7798
|
return;
|
|
7798
|
-
let rowNodesToAdd = [];
|
|
7799
7799
|
let entity;
|
|
7800
7800
|
if (this.gridType === TruDataGridTypes.DetailManyToMany)
|
|
7801
7801
|
entity = this.dataContext.entityAccess().searchByRefCacheOnly(this.config.resultConfig.entityManyToManyType, changeArgs.entity.Ref, true);
|
|
@@ -7808,9 +7808,9 @@ class TruDataGrid {
|
|
|
7808
7808
|
entityAlreadyInGrid = changeArgs.entity;
|
|
7809
7809
|
});
|
|
7810
7810
|
if (!entityAlreadyInGrid) {
|
|
7811
|
-
|
|
7812
|
-
this.rowData.unshift(
|
|
7813
|
-
this.api.applyTransaction({ add:
|
|
7811
|
+
let enhancedEntity = this.enhanceRowDataForEntity(entity);
|
|
7812
|
+
this.rowData.unshift(enhancedEntity);
|
|
7813
|
+
this.api.applyTransaction({ add: [enhancedEntity], addIndex: 0 });
|
|
7814
7814
|
}
|
|
7815
7815
|
}
|
|
7816
7816
|
}));
|