@esfaenza/es-table 11.2.22-beta8 → 11.2.22-beta9

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.
@@ -2822,7 +2822,7 @@
2822
2822
  }
2823
2823
  // Se tutti gli oggetti di questa pagina sono solezionati allora posso mettere il global check a true
2824
2824
  // Se sono in situazione di all-select anche metto la global checkbox, nonostante ci possano essere delle esclusioni
2825
- this.est.globalCheck = this.est.boundSource.filter(function (t) { return t._group || t._item; }).every(function (t) { return t._selected; });
2825
+ this.est.globalCheck = this.est.boundSource.length > 0 && this.est.boundSource.filter(function (t) { return t._group || t._item; }).every(function (t) { return t._selected; });
2826
2826
  this.est.canSelectAll = selectionItem.count > 0 && this.est.SelectAll;
2827
2827
  // Potrebbe cambiare qualora qualcuno inserisse dati a manazza in modalità Array e desse il refresh manuale alla tabella
2828
2828
  // Comunque costa 0 quindi mi permetto di refreshare
@@ -3214,21 +3214,26 @@
3214
3214
  tmpItems.push(selectionItem.items[i]);
3215
3215
  else
3216
3216
  itemsRemoved = true;
3217
- for (var i = 0; i < selectionItem.groups.length; i++)
3218
- if (selectionItem.groups[i] != null)
3219
- tmpGrp.push(selectionItem.groups[i]);
3220
- else
3221
- grpRemoved = true;
3222
3217
  for (var i = 0; i < selectionItem.exclusions.length; i++)
3223
3218
  if (selectionItem.exclusions[i] != null)
3224
3219
  tmpExcl.push(selectionItem.exclusions[i]);
3225
3220
  else
3226
3221
  exclRemoved = true;
3227
- for (var i = 0; i < selectionItem.group_exclusions.length; i++)
3228
- if (selectionItem.group_exclusions[i] != null)
3229
- tmpGrpExcl.push(selectionItem.group_exclusions[i]);
3230
- else
3231
- grpExclRemoved = true;
3222
+ // In vecchie versioni dell'AppSearch per cui non vengono deserializzate queste informaizoni potrebbero esserci casini
3223
+ if (selectionItem.groups) {
3224
+ for (var i = 0; i < selectionItem.groups.length; i++)
3225
+ if (selectionItem.groups[i] != null)
3226
+ tmpGrp.push(selectionItem.groups[i]);
3227
+ else
3228
+ grpRemoved = true;
3229
+ }
3230
+ if (selectionItem.group_exclusions) {
3231
+ for (var i = 0; i < selectionItem.group_exclusions.length; i++)
3232
+ if (selectionItem.group_exclusions[i] != null)
3233
+ tmpGrpExcl.push(selectionItem.group_exclusions[i]);
3234
+ else
3235
+ grpExclRemoved = true;
3236
+ }
3232
3237
  selectionItem.items = tmpItems;
3233
3238
  selectionItem.group_exclusions = tmpGrpExcl;
3234
3239
  selectionItem.exclusions = tmpExcl;