@esfaenza/es-table 11.2.132 → 11.2.135

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.
@@ -510,6 +510,7 @@
510
510
  aps.items = [];
511
511
  var newref = JSON.parse(JSON.stringify(aps));
512
512
  newref.items = items;
513
+ newref.page = 1;
513
514
  return newref;
514
515
  };
515
516
  return AppSearch;
@@ -1095,7 +1096,7 @@
1095
1096
  column_ordering: this.utiExts.deepClone(columnsOrderings),
1096
1097
  orders: this.utiExts.deepClone(columnOrders)
1097
1098
  };
1098
- this.prefService.setItem(this.est.ngControl.name, toStore, 'preference').subscribe();
1099
+ this.prefService.setItem(this.est.ngControl.name, toStore).subscribe();
1099
1100
  };
1100
1101
  /**
1101
1102
  * Partendo dagli **EsThs** estrappolo la lista di **EsTableColumn** che questa tabella dovrà eventualmente gestire per Visibilità e Ordine
@@ -4300,6 +4301,8 @@
4300
4301
  this.callTimeout = null;
4301
4302
  /** Cache dei th piuttosto che ricalcolarseli di continuo */
4302
4303
  this.thsCache = {};
4304
+ /** Indica quando la cache dei th è stata fillata almeno la prima volta */
4305
+ this.thsCacheSet = false;
4303
4306
  /**
4304
4307
  * Flag che, se **true**, per un giro di binding mantiene la visibilità impostata localmente, piuttosto che allineare alla View bindata.
4305
4308
  * Usata per modificare in maniera programmatica la visibilità delle colonne dal metodo **setHeaderVisibility**,
@@ -4530,7 +4533,7 @@
4530
4533
  // vuol dire che l'es-table è cambiata quindi non imposto preference
4531
4534
  if (((_b = this.EsThsDirective) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4532
4535
  for (i = 0; i < repository.length; i++) {
4533
- if (!this.thsCache[repository[i]]) {
4536
+ if (this.thsCacheSet && !this.thsCache[repository[i]]) {
4534
4537
  updatedPrefs = false;
4535
4538
  break;
4536
4539
  }
@@ -4742,6 +4745,7 @@
4742
4745
  var th = ths[i];
4743
4746
  this.thsCache[th.th] = th;
4744
4747
  }
4748
+ this.thsCacheSet = true;
4745
4749
  // Prepassaggio per tirare fuori tutte le info utili sugli headers in modo da non ricacolarseli sempre dopo
4746
4750
  var hI = this.columnMetadata_H.evaluateHeadersGroupingInfos(ths);
4747
4751
  if (this.arrayMode) // In modalità array non ho un backend...