Commit 4ee6d46f authored by LAVENIER's avatar LAVENIER
Browse files

Release v0.12.0

[fix] Table: keep row editing, when saving
parent 83bf3907
{
"name": "@sumaris-net/ngx-components",
"description": "SUMARiS Angular components",
"version": "0.11.12",
"version": "0.12.0",
"author": "contact@e-is.pro",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
......
......@@ -774,20 +774,20 @@ export abstract class AppTable<
return true;
}
async save(): Promise<boolean> {
async save(opts?: {keepEditing: boolean; }): Promise<boolean> {
if (this.readOnly) {
throw {code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY'};
}
this.resetError();
// Keep edited row id (should be done BEFORE confirmEditCreate() )
const editedRowId = toBoolean(opts?.keepEditing, this.keepEditedRowOnSave) && this.editedRow?.editing && this.editedRow.id;
if (!this.confirmEditCreate()) {
throw {code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR'};
}
// Keep edited row id
const editedRowId = this.keepEditedRowOnSave && this.editedRow?.id;
try {
// Mark as saving
this.markAsSaving();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment