@sumaris-net/ngx-components 2.8.3-beta6 → 2.8.3-beta7

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.
@@ -34660,13 +34660,13 @@ class AppAsyncTable {
34660
34660
  return this.dirtySubject.value;
34661
34661
  }
34662
34662
  get valid() {
34663
- return this.dataSource.getRows().every((row) => (row.editing ? row.valid : true));
34663
+ return this.dataSource.getEditingRows().every((row) => (row.editing ? row.valid : true));
34664
34664
  }
34665
34665
  get invalid() {
34666
- return this.dataSource.getRows().some((row) => (row.editing ? row.invalid : false));
34666
+ return this.dataSource.getEditingRows().some((row) => (row.editing ? row.invalid : false));
34667
34667
  }
34668
34668
  get pending() {
34669
- return this.dataSource.getRows().some((row) => (row.editing ? row.pending : false));
34669
+ return this.dataSource.getEditingRows().some((row) => (row.editing ? row.pending : false));
34670
34670
  }
34671
34671
  get touched() {
34672
34672
  return this.touchedSubject.value;
@@ -34712,7 +34712,7 @@ class AppAsyncTable {
34712
34712
  }
34713
34713
  }
34714
34714
  markAsPristine(opts) {
34715
- if (this.dirtySubject.value !== false) {
34715
+ if (!this.dirtySubject.closed && this.dirtySubject.value !== false) {
34716
34716
  this.dirtySubject.next(false);
34717
34717
  if (!opts || opts.emitEvent !== false) {
34718
34718
  this.markForCheck();
@@ -34725,7 +34725,7 @@ class AppAsyncTable {
34725
34725
  this.touchedSubject.next(false);
34726
34726
  needEmitEvent = true;
34727
34727
  }
34728
- if (this.dirty || this.dataSource.hasSomeEditingRow()) {
34728
+ if (this.dirty) {
34729
34729
  for (const row of this.dataSource.getEditingRows()) {
34730
34730
  // Cancel the current editing row only if editing and if it was not previously saved
34731
34731
  if (row.id === -1) {
@@ -34764,9 +34764,7 @@ class AppAsyncTable {
34764
34764
  if (!opts || opts.emitEvent !== false)
34765
34765
  this.markForCheck();
34766
34766
  }
34767
- if (this.dataSource.hasSomeEditingRow()) {
34768
- this.dataSource.getEditingRows().forEach((row) => row.validator?.markAllAsTouched());
34769
- }
34767
+ this.dataSource.getEditingRows().forEach((row) => row.validator?.markAllAsTouched());
34770
34768
  }
34771
34769
  markAsSaving(opts) {
34772
34770
  if (!this.savingSubject.closed && this.savingSubject.value !== true) {
@@ -35426,7 +35424,7 @@ class AppAsyncTable {
35426
35424
  await this.dataSource.move(id, direction);
35427
35425
  }
35428
35426
  ready(opts) {
35429
- return waitForTrue(this.readySubject, opts);
35427
+ return waitForTrue(this.readySubject, { stop: this.destroySubject, ...opts });
35430
35428
  }
35431
35429
  waitIdle(opts) {
35432
35430
  if (!this.loadingSubject.value)