@sumaris-net/ngx-components 1.5.10 → 1.5.11
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 +14 -9
- 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/table.class.js +15 -10
- package/fesm2015/sumaris-net.ngx-components.js +14 -9
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -24922,16 +24922,21 @@
|
|
|
24922
24922
|
return [2 /*return*/, 0]; // Cannot delete
|
|
24923
24923
|
if (!this.saveBeforeDelete) return [3 /*break*/, 3];
|
|
24924
24924
|
// Cancel invalid rows (because of save() will fail, if invalid rows exists)
|
|
24925
|
-
rows.
|
|
24926
|
-
|
|
24927
|
-
|
|
24928
|
-
|
|
24929
|
-
|
|
24930
|
-
|
|
24931
|
-
|
|
24932
|
-
|
|
24925
|
+
rows = rows.reduce(function (res, row) {
|
|
24926
|
+
if (row.validator && !row.validator.valid) {
|
|
24927
|
+
var deleted = row.id === -1;
|
|
24928
|
+
row.cancelOrDelete();
|
|
24929
|
+
// When deleted (= newly created row) : decrement counter
|
|
24930
|
+
if (deleted) {
|
|
24931
|
+
_this.visibleRowCount--;
|
|
24932
|
+
_this.totalRowCount--;
|
|
24933
|
+
return res;
|
|
24934
|
+
}
|
|
24933
24935
|
}
|
|
24934
|
-
|
|
24936
|
+
return res.concat(row);
|
|
24937
|
+
}, []);
|
|
24938
|
+
if (isEmptyArray(rows))
|
|
24939
|
+
return [2 /*return*/, 0];
|
|
24935
24940
|
return [4 /*yield*/, this.saveBeforeAction('delete')];
|
|
24936
24941
|
case 2:
|
|
24937
24942
|
saved = _d.sent();
|