@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.
@@ -4280,7 +4280,7 @@
4280
4280
  if (throttle === void 0) { throttle = true; }
4281
4281
  var _a, _b;
4282
4282
  return __awaiter(this, void 0, void 0, function () {
4283
- var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, thsCache, i, th, i, prefs, cols, updatedPrefs, repository, source, i;
4283
+ var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, arr, thsCache, i, th, i, prefs, cols, updatedPrefs, repository, source, i;
4284
4284
  var _this = this;
4285
4285
  return __generator(this, function (_t) {
4286
4286
  switch (_t.label) {
@@ -4357,9 +4357,10 @@
4357
4357
  // Se mi baso su direttive ma nelle preference è presente anche solo una colonna non presente nelle direttive
4358
4358
  // vuol dire che l'es-table è cambiata quindi non imposto preference
4359
4359
  if (((_b = this.EsThsDirective) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4360
+ arr = this.EsThsDirective.toArray();
4360
4361
  thsCache = {};
4361
- for (i = 0; i < this.EsThsDirective.length; i++) {
4362
- th = this.EsThsDirective[i];
4362
+ for (i = 0; i < arr.length; i++) {
4363
+ th = arr[i];
4363
4364
  thsCache[th.th] = th;
4364
4365
  }
4365
4366
  for (i = 0; i < repository.length; i++) {
@@ -4372,7 +4373,9 @@
4372
4373
  if (updatedPrefs) {
4373
4374
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4374
4375
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
4375
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4376
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
4377
+ if (prefs)
4378
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4376
4379
  }
4377
4380
  }
4378
4381
  _t.label = 4;
@@ -4424,7 +4427,9 @@
4424
4427
  if (updatedPrefs) {
4425
4428
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
4426
4429
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
4427
- this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4430
+ // Se le pref sono nulle non sovrascrivo gli ordini dato che potrebbe servire mettere degli ordinamenti di default lato ts
4431
+ if (prefs)
4432
+ this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
4428
4433
  }
4429
4434
  _t.label = 9;
4430
4435
  case 9: