@trudb/tru-common-lib 0.2.514 → 0.2.517
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.
|
@@ -4812,6 +4812,7 @@ class TruDetailViewBase {
|
|
|
4812
4812
|
disableNavigationToNextEntity = false;
|
|
4813
4813
|
navigationIndex = 0;
|
|
4814
4814
|
recordsBeforeRevert = 0;
|
|
4815
|
+
active = false;
|
|
4815
4816
|
subs = [];
|
|
4816
4817
|
constructor(dataContext, componentLookup, appEnvironment, textManager, desktopManager, windowEventHandler, desktopViewEventNotifier, util) {
|
|
4817
4818
|
this.dataContext = dataContext;
|
|
@@ -4845,10 +4846,12 @@ class TruDetailViewBase {
|
|
|
4845
4846
|
onAddEntity = (newEntity, dataNotification = false) => {
|
|
4846
4847
|
if (!newEntity)
|
|
4847
4848
|
newEntity = this.dataContext.entityAccess().add(this.entityType);
|
|
4848
|
-
if (
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4849
|
+
if (!dataNotification) {
|
|
4850
|
+
if (this.parentEntity && this.view.parentTableRefName)
|
|
4851
|
+
newEntity[this.view.parentTableRefName] = this.parentEntity[this.view.parentTableRefName];
|
|
4852
|
+
else
|
|
4853
|
+
newEntity[this.view.parentTableRefName] = this.entity[this.view.parentTableRefName];
|
|
4854
|
+
}
|
|
4852
4855
|
if (!dataNotification) {
|
|
4853
4856
|
this.entities.unshift(newEntity);
|
|
4854
4857
|
this.navigateTo(0);
|
|
@@ -4917,7 +4920,8 @@ class TruDetailViewBase {
|
|
|
4917
4920
|
}
|
|
4918
4921
|
}));
|
|
4919
4922
|
this.subs.push(this.view.onActive().subscribe((active) => {
|
|
4920
|
-
|
|
4923
|
+
this.active = active;
|
|
4924
|
+
if (this.active)
|
|
4921
4925
|
this.setEntityDisplayValues(this.tableName);
|
|
4922
4926
|
}));
|
|
4923
4927
|
this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
|