@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.
@@ -24937,7 +24937,8 @@ class AppTable {
24937
24937
  this.resetError();
24938
24938
  // Keep edited row id (should be done BEFORE confirmEditCreate() )
24939
24939
  this.previouslyEditedRowId = opts.keepEditing ? ((this.editedRow?.editing ? this.editedRow.id : undefined) || this.singleSelectedRow?.id) : undefined;
24940
- const previouslyEditedData = opts.keepEditing ? (isNotNil(this.previouslyEditedRowId) && this.editedRow?.currentData || this.singleSelectedRow?.currentData) : undefined;
24940
+ const previouslyEditedRowId = this.previouslyEditedRowId;
24941
+ const previouslyEditedData = opts.keepEditing ? (isNotNil(previouslyEditedRowId) && this.editedRow?.currentData || this.singleSelectedRow?.currentData) : undefined;
24941
24942
  if (!this.confirmEditCreate()) {
24942
24943
  throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
24943
24944
  }
@@ -24959,8 +24960,8 @@ class AppTable {
24959
24960
  finally {
24960
24961
  this.markAsSaved();
24961
24962
  // Restore previous row
24962
- if (isNotNil(this.previouslyEditedRowId)) {
24963
- await this.selectRowByIdOrData(this.previouslyEditedRowId, previouslyEditedData);
24963
+ if (isNotNil(previouslyEditedRowId)) {
24964
+ await this.selectRowByIdOrData(previouslyEditedRowId, previouslyEditedData);
24964
24965
  }
24965
24966
  }
24966
24967
  }
@@ -30423,7 +30424,8 @@ class AppAsyncTable {
30423
30424
  // Keep edited row id (should be done BEFORE confirmEditCreate() )
30424
30425
  const editedRow = this.dataSource.getSingleEditingRow();
30425
30426
  this.previouslyEditedRowId = opts.keepEditing ? ((editedRow?.editing ? editedRow.id : undefined) || this.singleSelectedRow?.id) : undefined;
30426
- const previouslyEditedData = opts.keepEditing ? (isNotNil(this.previouslyEditedRowId) && editedRow?.currentData || this.singleSelectedRow?.currentData) : undefined;
30427
+ const previouslyEditedRowId = this.previouslyEditedRowId;
30428
+ const previouslyEditedData = opts.keepEditing ? (isNotNil(previouslyEditedRowId) && editedRow?.currentData || this.singleSelectedRow?.currentData) : undefined;
30427
30429
  if (!await this.confirmEditCreate()) {
30428
30430
  throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
30429
30431
  }
@@ -30445,8 +30447,8 @@ class AppAsyncTable {
30445
30447
  finally {
30446
30448
  this.markAsSaved();
30447
30449
  // Restore previous row
30448
- if (isNotNil(this.previouslyEditedRowId)) {
30449
- await this.selectRowByIdOrData(this.previouslyEditedRowId, previouslyEditedData);
30450
+ if (isNotNil(previouslyEditedRowId)) {
30451
+ await this.selectRowByIdOrData(previouslyEditedRowId, previouslyEditedData);
30450
30452
  }
30451
30453
  }
30452
30454
  }