@trudb/tru-common-lib 0.2.76 → 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.
@@ -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 (!this.entities.length) {
3996
- let index = this.view.window.views.indexOf(this.view);
3997
- if (index > -1) {
3998
- this.view.window.views.splice(index, 1);
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;