@sumaris-net/ngx-components 2.4.90-rc5 → 2.4.91

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.
@@ -375,7 +375,9 @@ function sort(array, attribute, opts) {
375
375
  : (v1, v2) => v1 === v2 ? 0 : v1 > v2 ? 1 : -1;
376
376
  return array
377
377
  .slice() // copy
378
- .sort((a, b) => compareFn(a[attribute], b[attribute]));
378
+ .sort(attribute
379
+ ? (a, b) => compareFn(a[attribute], b[attribute])
380
+ : compareFn);
379
381
  }
380
382
  const INTEGER_REGEXP = /^[-]?\d+$/;
381
383
  function isInt(value) {
@@ -4728,7 +4730,7 @@ class AppFormArray extends UntypedFormArray {
4728
4730
  // Clean all
4729
4731
  this.resize(0, { emitEvent: options?.emitEvent });
4730
4732
  // Recreate each control, with a default value
4731
- (values || null).forEach(value => {
4733
+ (values || []).forEach(value => {
4732
4734
  const control = this.createControl(value);
4733
4735
  // Apply parent disabled state, before to push it into the array
4734
4736
  // This is need to avoid parent form to be enabled, after calling AppFormArray.patchValue() (e.g. in table's row validator)
@@ -27367,8 +27369,9 @@ class AppTable {
27367
27369
  }
27368
27370
  async deleteSelection(event, opts) {
27369
27371
  const deleteCount = await this.deleteRows(event, this.selection.selected, opts);
27370
- if (deleteCount > 0)
27372
+ if (deleteCount > 0) {
27371
27373
  this.selection.clear();
27374
+ }
27372
27375
  return deleteCount;
27373
27376
  }
27374
27377
  /**