@trudb/tru-common-lib 0.2.224 → 0.2.226
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.
|
@@ -2003,9 +2003,9 @@ class TruDataContext {
|
|
|
2003
2003
|
changeArgs.entityAction !== EntityAction.MergeOnSave) {
|
|
2004
2004
|
this.propertyChanged(changeArgs);
|
|
2005
2005
|
this.entityChangedHandler(changeArgs);
|
|
2006
|
-
if (changeArgs.entityAction === EntityAction.Attach)
|
|
2007
|
-
this.entityAdded(changeArgs);
|
|
2008
2006
|
}
|
|
2007
|
+
if (changeArgs.entityAction === EntityAction.Attach)
|
|
2008
|
+
this.entityAdded(changeArgs);
|
|
2009
2009
|
});
|
|
2010
2010
|
}
|
|
2011
2011
|
onPropertyChanged() {
|
|
@@ -2076,7 +2076,7 @@ class TruDataContext {
|
|
|
2076
2076
|
};
|
|
2077
2077
|
modelPropertyOnAddHandler = (entity) => {
|
|
2078
2078
|
// @ts-expect-error
|
|
2079
|
-
let handler = entity.entityType._onAdd
|
|
2079
|
+
let handler = entity.entityType._onAdd?.handler;
|
|
2080
2080
|
if (handler)
|
|
2081
2081
|
handler(entity, this);
|
|
2082
2082
|
};
|
|
@@ -4001,8 +4001,8 @@ 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
|
-
this.entities.
|
|
4005
|
-
this.navigateTo(
|
|
4004
|
+
this.entities.unshift(newEntity);
|
|
4005
|
+
this.navigateTo(0);
|
|
4006
4006
|
};
|
|
4007
4007
|
onCloneEntity = () => {
|
|
4008
4008
|
let windowEventArgs = this.desktopManager.addModalWindow(this.tableName, this.tableName, this.tableName, 'TruCloneView', this.entities, this.navigationIndex, this.dataContext, false, false, false);
|
|
@@ -7789,7 +7789,7 @@ class TruDataGrid {
|
|
|
7789
7789
|
}
|
|
7790
7790
|
}));
|
|
7791
7791
|
this.subs.push(this.dataContext.onEntityAdded().subscribe((changeArgs) => {
|
|
7792
|
-
if (!changeArgs.entity)
|
|
7792
|
+
if (!changeArgs.entity || this.isActive)
|
|
7793
7793
|
return;
|
|
7794
7794
|
let rowNodesToAdd = [];
|
|
7795
7795
|
let entity;
|