@esfaenza/es-table 11.2.111 → 11.2.113

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.
@@ -3848,9 +3848,10 @@ class EsTableComponent {
3848
3848
  // Se mi baso su direttive ma nelle preference è presente anche solo una colonna non presente nelle direttive
3849
3849
  // vuol dire che l'es-table è cambiata quindi non imposto preference
3850
3850
  if (((_b = this.EsThsDirective) === null || _b === void 0 ? void 0 : _b.length) > 0) {
3851
+ let arr = this.EsThsDirective.toArray();
3851
3852
  let thsCache = {};
3852
- for (let i = 0; i < this.EsThsDirective.length; i++) {
3853
- let th = this.EsThsDirective[i];
3853
+ for (let i = 0; i < arr.length; i++) {
3854
+ let th = arr[i];
3854
3855
  thsCache[th.th] = th;
3855
3856
  }
3856
3857
  for (let i = 0; i < repository.length; i++) {
@@ -3863,7 +3864,9 @@ class EsTableComponent {
3863
3864
  if (updatedPrefs) {
3864
3865
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
3865
3866
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
3866
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
3867
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
3868
+ if (prefs)
3869
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
3867
3870
  }
3868
3871
  }
3869
3872
  }
@@ -3911,7 +3914,9 @@ class EsTableComponent {
3911
3914
  if (updatedPrefs) {
3912
3915
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
3913
3916
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
3914
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
3917
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
3918
+ if (prefs)
3919
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
3915
3920
  }
3916
3921
  }
3917
3922
  }