@sumaris-net/ngx-components 2.0.0-rc37 → 2.0.0-rc39

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.
@@ -11166,10 +11166,6 @@ class EntityClasses {
11166
11166
  EntityClasses.CLASSES_BY_NAME = new Map();
11167
11167
  // eslint-disable-next-line prefer-arrow/prefer-arrow-functions
11168
11168
  function EntityClass(opts) {
11169
- opts = {
11170
- fromObjectReuseStrategy: 'default',
11171
- ...opts
11172
- };
11173
11169
  // eslint-disable-next-line prefer-arrow/prefer-arrow-functions
11174
11170
  return function (constructor) {
11175
11171
  var _a, _b;
@@ -24984,6 +24980,8 @@ class EntitiesTableDataSource extends TableDataSource {
24984
24980
  return;
24985
24981
  }
24986
24982
  this.markAsLoading();
24983
+ const superDelete = super.delete;
24984
+ const self = this;
24987
24985
  this.dataService.deleteAll([row.currentData], this.serviceOptions)
24988
24986
  .catch(err => this.handleServiceError(err))
24989
24987
  .then(() => {
@@ -24991,7 +24989,7 @@ class EntitiesTableDataSource extends TableDataSource {
24991
24989
  // make sure row has been deleted (because GrapQHl cache remove can failed)
24992
24990
  const present = this.getRow(id) === row;
24993
24991
  if (present)
24994
- super.delete(id);
24992
+ superDelete.call(self, id);
24995
24993
  this.markAsLoaded();
24996
24994
  }, 300);
24997
24995
  });
@@ -25002,6 +25000,7 @@ class EntitiesTableDataSource extends TableDataSource {
25002
25000
  try {
25003
25001
  // Call service deletion
25004
25002
  await this.dataService.deleteAll(data, this.serviceOptions);
25003
+ await sleep(300); // Wait propagation (e.g. update cache, then received update from dataService.watchAll())
25005
25004
  // Workaround, to be sure all rows have been deleted
25006
25005
  // Sometime, the service miss deletion, or GraphQl cache remove failed.
25007
25006
  // In this case, apply missing deletion using the super.delete() function