@sumaris-net/ngx-components 1.6.1 → 1.6.2
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/bundles/sumaris-net.ngx-components.umd.js +7 -3
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/table/entities-table-datasource.class.js +9 -3
- package/fesm2015/sumaris-net.ngx-components.js +8 -2
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/entities-table-datasource.class.d.ts +1 -1
|
@@ -24012,22 +24012,26 @@
|
|
|
24012
24012
|
switch (_a.label) {
|
|
24013
24013
|
case 0:
|
|
24014
24014
|
if (!this._fetchMoreFn)
|
|
24015
|
-
return [2 /*return
|
|
24015
|
+
return [2 /*return*/, false]; // Avoid multiple call
|
|
24016
24016
|
if (this._editingRowCount > 0) {
|
|
24017
24017
|
console.warn('Cannot fetch more because still editing row');
|
|
24018
24018
|
return [2 /*return*/];
|
|
24019
24019
|
}
|
|
24020
|
+
// Fetch next page
|
|
24021
|
+
this._fetchMoreFn = null; // Avoid multiple call
|
|
24020
24022
|
return [4 /*yield*/, this._fetchMoreFn()];
|
|
24021
24023
|
case 1:
|
|
24022
24024
|
res = _a.sent();
|
|
24025
|
+
// Skip if empty (no more data)
|
|
24023
24026
|
if (isNotEmptyArray(res === null || res === void 0 ? void 0 : res.data))
|
|
24024
|
-
return [2 /*return
|
|
24027
|
+
return [2 /*return*/, false];
|
|
24025
24028
|
return [4 /*yield*/, this.getData()];
|
|
24026
24029
|
case 2:
|
|
24027
24030
|
existingData = _a.sent();
|
|
24028
24031
|
_super.updateDatasource.call(this, existingData.concat.apply(existingData, __spread(res.data)), opts);
|
|
24032
|
+
// Remember fetchMore
|
|
24029
24033
|
this._fetchMoreFn = res.fetchMore;
|
|
24030
|
-
return [2 /*return
|
|
24034
|
+
return [2 /*return*/, true];
|
|
24031
24035
|
}
|
|
24032
24036
|
});
|
|
24033
24037
|
});
|