@trudb/tru-common-lib 0.2.76 → 0.2.79
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.
|
@@ -3991,11 +3991,15 @@ class TruDetailViewBase {
|
|
|
3991
3991
|
};
|
|
3992
3992
|
onDeleteEntity = () => {
|
|
3993
3993
|
let confirmMsg = this.textManager.fmtDeleteConfirmation(this.entityType.name);
|
|
3994
|
-
this.dataContext.delete([this.entity], confirmMsg, () => {
|
|
3995
|
-
if (
|
|
3996
|
-
let index = this.
|
|
3997
|
-
|
|
3998
|
-
|
|
3994
|
+
this.dataContext.delete([this.entity], confirmMsg, (successful) => {
|
|
3995
|
+
if (successful) {
|
|
3996
|
+
let index = this.entities.indexOf(this.entity);
|
|
3997
|
+
this.entities.splice(index, 1);
|
|
3998
|
+
if (!this.entities.length) {
|
|
3999
|
+
index = this.view.window.views.indexOf(this.view);
|
|
4000
|
+
if (index > -1) {
|
|
4001
|
+
this.view.window.views.splice(index, 1);
|
|
4002
|
+
}
|
|
3999
4003
|
}
|
|
4000
4004
|
}
|
|
4001
4005
|
return true;
|
|
@@ -6507,7 +6511,7 @@ class TruGridValidationDialog {
|
|
|
6507
6511
|
onAccept = () => {
|
|
6508
6512
|
let entity = this.config.entity;
|
|
6509
6513
|
let originalValues = entity.entityAspect.originalValues;
|
|
6510
|
-
let propertyName = this.config.propertyName;
|
|
6514
|
+
let propertyName = this.config.propertyConfig.propertyName;
|
|
6511
6515
|
entity[propertyName] = this.config.mergeData?.get(propertyName).value;
|
|
6512
6516
|
this.config.mergeData?.clear(propertyName);
|
|
6513
6517
|
if (originalValues.hasOwnProperty(propertyName) && (Object.keys(originalValues).length === 0 && originalValues.constructor === Object))
|