@esfaenza/es-table 11.2.35 → 11.2.37

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.
@@ -1817,7 +1817,7 @@
1817
1817
  var columns = this.est.arrayMode ? this.est.arrayColumns : castedView.columns;
1818
1818
  var columnsOrderings = this.est.arrayMode ? this.est.arrayColumnOrdering : castedView.column_ordering;
1819
1819
  var toStore = { columns: JSON.parse(JSON.stringify(columns)), column_ordering: JSON.parse(JSON.stringify(columnsOrderings)) };
1820
- this.prefService.store(this.est.ngControl.name, toStore, 'preference').subscribe();
1820
+ this.prefService.setItem(this.est.ngControl.name, toStore, 'preference').subscribe();
1821
1821
  }
1822
1822
  // Rieseguo l'ultima ricerca bindata alla tabella
1823
1823
  // Mi assicuro di farlo dopo l'espansione del changed o rischio che la ricerca mi ridia colonne che in realtà non esistono
@@ -4109,7 +4109,7 @@
4109
4109
  if (!!this.prefService) return [3 /*break*/, 3];
4110
4110
  console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");
4111
4111
  return [3 /*break*/, 5];
4112
- case 3: return [4 /*yield*/, this.prefService.retrieve(this.ngControl.name).toPromise()];
4112
+ case 3: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4113
4113
  case 4:
4114
4114
  prefs = _s.sent();
4115
4115
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
@@ -4136,7 +4136,7 @@
4136
4136
  if (!!this.prefService) return [3 /*break*/, 8];
4137
4137
  console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");
4138
4138
  return [3 /*break*/, 10];
4139
- case 8: return [4 /*yield*/, this.prefService.retrieve(this.ngControl.name).toPromise()];
4139
+ case 8: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
4140
4140
  case 9:
4141
4141
  prefs = _s.sent();
4142
4142
  this.arrayColumns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
@@ -4345,20 +4345,20 @@
4345
4345
  */
4346
4346
  EsTableComponent.prototype.bindDisplayToLoadedItemsOrGroups = function (view) {
4347
4347
  var _a, _b;
4348
- if (this.TMPBoundSource.length == 0) {
4348
+ if (!this.TMPBoundSource || this.TMPBoundSource.length == 0) {
4349
4349
  this.BaseItemsCount = 0;
4350
- this.boundSource = this.TMPBoundSource;
4350
+ this.boundSource = [];
4351
4351
  return;
4352
4352
  }
4353
4353
  if (this.arrayMode || !this.UseCustomCells) {
4354
4354
  this.boundSource = this.TMPBoundSource;
4355
- this.BaseItemsCount = (view === null || view === void 0 ? void 0 : view.objectcount) || view.length;
4355
+ this.BaseItemsCount = (view === null || view === void 0 ? void 0 : view.objectcount) || (view === null || view === void 0 ? void 0 : view.length) || 0;
4356
4356
  return;
4357
4357
  }
4358
- var groupingKeys = ((_b = (_a = view.groupings) === null || _a === void 0 ? void 0 : _a.filter(function (t) { return !t.aggregation; })) === null || _b === void 0 ? void 0 : _b.length) || 0;
4358
+ var groupingKeys = ((_b = (_a = view === null || view === void 0 ? void 0 : view.groupings) === null || _a === void 0 ? void 0 : _a.filter(function (t) { return !t.aggregation; })) === null || _b === void 0 ? void 0 : _b.length) || 0;
4359
4359
  if (groupingKeys == 0) {
4360
4360
  this.boundSource = this.TMPBoundSource;
4361
- this.BaseItemsCount = view.objectcount;
4361
+ this.BaseItemsCount = (view === null || view === void 0 ? void 0 : view.objectcount) || 0;
4362
4362
  return;
4363
4363
  }
4364
4364
  this.rowGrouping_H.handleNewDataOnRowGrouping(view, groupingKeys);