@sumaris-net/ngx-components 2.5.1 → 2.5.2-rc1
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/async-table.class.mjs +5 -4
- package/esm2020/src/app/core/table/table.class.mjs +5 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +8 -6
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +8 -6
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -25394,7 +25394,8 @@ class AppTable {
|
|
|
25394
25394
|
this.resetError();
|
|
25395
25395
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
25396
25396
|
this.previouslyEditedRowId = opts.keepEditing ? ((((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined) || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.id)) : undefined;
|
|
25397
|
-
const
|
|
25397
|
+
const previouslyEditedRowId = this.previouslyEditedRowId;
|
|
25398
|
+
const previouslyEditedData = opts.keepEditing ? (isNotNil(previouslyEditedRowId) && ((_c = this.editedRow) === null || _c === void 0 ? void 0 : _c.currentData) || ((_d = this.singleSelectedRow) === null || _d === void 0 ? void 0 : _d.currentData)) : undefined;
|
|
25398
25399
|
if (!this.confirmEditCreate()) {
|
|
25399
25400
|
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
25400
25401
|
}
|
|
@@ -25416,8 +25417,8 @@ class AppTable {
|
|
|
25416
25417
|
finally {
|
|
25417
25418
|
this.markAsSaved();
|
|
25418
25419
|
// Restore previous row
|
|
25419
|
-
if (isNotNil(
|
|
25420
|
-
yield this.selectRowByIdOrData(
|
|
25420
|
+
if (isNotNil(previouslyEditedRowId)) {
|
|
25421
|
+
yield this.selectRowByIdOrData(previouslyEditedRowId, previouslyEditedData);
|
|
25421
25422
|
}
|
|
25422
25423
|
}
|
|
25423
25424
|
});
|
|
@@ -31099,7 +31100,8 @@ class AppAsyncTable {
|
|
|
31099
31100
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
31100
31101
|
const editedRow = this.dataSource.getSingleEditingRow();
|
|
31101
31102
|
this.previouslyEditedRowId = opts.keepEditing ? (((editedRow === null || editedRow === void 0 ? void 0 : editedRow.editing) ? editedRow.id : undefined) || ((_a = this.singleSelectedRow) === null || _a === void 0 ? void 0 : _a.id)) : undefined;
|
|
31102
|
-
const
|
|
31103
|
+
const previouslyEditedRowId = this.previouslyEditedRowId;
|
|
31104
|
+
const previouslyEditedData = opts.keepEditing ? (isNotNil(previouslyEditedRowId) && (editedRow === null || editedRow === void 0 ? void 0 : editedRow.currentData) || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData)) : undefined;
|
|
31103
31105
|
if (!(yield this.confirmEditCreate())) {
|
|
31104
31106
|
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
31105
31107
|
}
|
|
@@ -31121,8 +31123,8 @@ class AppAsyncTable {
|
|
|
31121
31123
|
finally {
|
|
31122
31124
|
this.markAsSaved();
|
|
31123
31125
|
// Restore previous row
|
|
31124
|
-
if (isNotNil(
|
|
31125
|
-
yield this.selectRowByIdOrData(
|
|
31126
|
+
if (isNotNil(previouslyEditedRowId)) {
|
|
31127
|
+
yield this.selectRowByIdOrData(previouslyEditedRowId, previouslyEditedData);
|
|
31126
31128
|
}
|
|
31127
31129
|
}
|
|
31128
31130
|
});
|