Commit bb6d26cc authored by PECQUOT's avatar PECQUOT
Browse files

release 0.13.9

[fix] table.class.ts: markAsUntouched: cancel or delete row only if currently editing (avoid deleting axing row)
parent dd87d1c2
{
"name": "@sumaris-net/ngx-components",
"description": "SUMARiS Angular components",
"version": "0.13.8",
"version": "0.13.9",
"author": "contact@e-is.pro",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
......
......@@ -260,9 +260,11 @@ export abstract class AppTable<
markAsUntouched(opts?: {onlySelf?: boolean; emitEvent?: boolean }) {
if (this.dirtySubject.value !== false || (this.editedRow && this.editedRow.id !== this.previouslySavedEditedRowId)) {
// Cancel the current editing row only if it was not previously saved
// Cancel the current editing row only if editing and if it was not previously saved
this.dirtySubject.next(false);
this.dataSource.cancelOrDelete(this.editedRow);
if (this.editedRow.editing) {
this.dataSource.cancelOrDelete(this.editedRow);
}
this.editedRow = null;
if (!opts || opts.emitEvent !== false) {
this.markForCheck();
......
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