@sumaris-net/ngx-components 2.0.0-rc37 → 2.0.0-rc38
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.
- package/esm2020/src/app/core/table/entities-table-datasource.class.mjs +6 -3
- package/fesm2015/sumaris-net.ngx-components.mjs +4 -1
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +4 -1
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -24984,6 +24984,8 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
24984
24984
|
return;
|
|
24985
24985
|
}
|
|
24986
24986
|
this.markAsLoading();
|
|
24987
|
+
const superDelete = super.delete;
|
|
24988
|
+
const self = this;
|
|
24987
24989
|
this.dataService.deleteAll([row.currentData], this.serviceOptions)
|
|
24988
24990
|
.catch(err => this.handleServiceError(err))
|
|
24989
24991
|
.then(() => {
|
|
@@ -24991,7 +24993,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
24991
24993
|
// make sure row has been deleted (because GrapQHl cache remove can failed)
|
|
24992
24994
|
const present = this.getRow(id) === row;
|
|
24993
24995
|
if (present)
|
|
24994
|
-
|
|
24996
|
+
superDelete.call(self, id);
|
|
24995
24997
|
this.markAsLoaded();
|
|
24996
24998
|
}, 300);
|
|
24997
24999
|
});
|
|
@@ -25002,6 +25004,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
25002
25004
|
try {
|
|
25003
25005
|
// Call service deletion
|
|
25004
25006
|
await this.dataService.deleteAll(data, this.serviceOptions);
|
|
25007
|
+
await sleep(300); // Wait propagation (e.g. update cache, then received update from dataService.watchAll())
|
|
25005
25008
|
// Workaround, to be sure all rows have been deleted
|
|
25006
25009
|
// Sometime, the service miss deletion, or GraphQl cache remove failed.
|
|
25007
25010
|
// In this case, apply missing deletion using the super.delete() function
|