@trudb/tru-common-lib 0.2.75 → 0.2.77
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.
|
@@ -2382,13 +2382,13 @@ class TruContextFilters {
|
|
|
2382
2382
|
valueFor = (tableName) => {
|
|
2383
2383
|
let choice = this.filters.find(f => f.selectedChoice.table === tableName)?.selectedChoice;
|
|
2384
2384
|
if (!choice)
|
|
2385
|
-
|
|
2385
|
+
return undefined;
|
|
2386
2386
|
return choice.ref;
|
|
2387
2387
|
};
|
|
2388
2388
|
value = () => {
|
|
2389
2389
|
let choice = this.filters.find(f => f.selectedChoice)?.selectedChoice;
|
|
2390
2390
|
if (!choice)
|
|
2391
|
-
|
|
2391
|
+
return undefined;
|
|
2392
2392
|
return choice;
|
|
2393
2393
|
};
|
|
2394
2394
|
label = () => {
|
|
@@ -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;
|