@esfaenza/es-table 15.2.27 → 15.2.28
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.
|
@@ -4343,8 +4343,12 @@ class EsTableComponent {
|
|
|
4343
4343
|
registerOnTouched(fn) { }
|
|
4344
4344
|
/** @ignore */
|
|
4345
4345
|
changed(clearItems = false) {
|
|
4346
|
-
if (clearItems && this.viewMode)
|
|
4347
|
-
this.
|
|
4346
|
+
if (clearItems && this.viewMode) {
|
|
4347
|
+
if (!this.ItemSourceProperty)
|
|
4348
|
+
this.View.items = [];
|
|
4349
|
+
else
|
|
4350
|
+
this.View[this.ItemSourceProperty] = [];
|
|
4351
|
+
}
|
|
4348
4352
|
this.propagateChange(this.View);
|
|
4349
4353
|
}
|
|
4350
4354
|
/** @ignore */
|
|
@@ -4437,7 +4441,7 @@ class EsTableComponent {
|
|
|
4437
4441
|
}
|
|
4438
4442
|
// La paginazione devo farla solamente quando richiedo o un gruppo principale (se sono in row grouping) o se non richiedo gruppi (in tutti lgi altri casi)
|
|
4439
4443
|
if (firstItemGroupOrNoGrouping)
|
|
4440
|
-
this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.View.page, this.View.pages || 1, this.View.items.length, this.View.itemsperpageoverride);
|
|
4444
|
+
this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.View.page, this.View.pages || 1, (this.ItemSourceProperty ? this.View[this.ItemSourceProperty] : this.View.items).length, this.View.itemsperpageoverride);
|
|
4441
4445
|
}
|
|
4442
4446
|
else if (this.View && (this.View.length != null && this.View.length != undefined)) {
|
|
4443
4447
|
this.setMode('array');
|
|
@@ -4593,7 +4597,7 @@ class EsTableComponent {
|
|
|
4593
4597
|
// Molte cose sono ovviamente disponibili solo in modalità View
|
|
4594
4598
|
if ((this.viewMode || this.arrayMode) && this.UseCustomCells) {
|
|
4595
4599
|
let view = this.viewMode ? View : null;
|
|
4596
|
-
let itemsAndGroups = this.viewMode ? [...(view.items || []), ...(view.groups || [])] : View;
|
|
4600
|
+
let itemsAndGroups = this.viewMode ? [...((this.ItemSourceProperty ? view[this.ItemSourceProperty] : view.items) || []), ...(view.groups || [])] : View;
|
|
4597
4601
|
let si = this.viewMode ? view.selection : this.arraymodeSelection;
|
|
4598
4602
|
// N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
|
|
4599
4603
|
// ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
|
|
@@ -4650,7 +4654,7 @@ class EsTableComponent {
|
|
|
4650
4654
|
}
|
|
4651
4655
|
else if ((this.viewMode || this.arrayMode) && !this.UseCustomCells) {
|
|
4652
4656
|
// Riallineo le info di selezione degli elementi della View
|
|
4653
|
-
let items = this.viewMode ? View.items : View;
|
|
4657
|
+
let items = this.viewMode ? (this.ItemSourceProperty ? View[this.ItemSourceProperty] : View.items) : View;
|
|
4654
4658
|
let si = this.viewMode ? View.selection : this.arraymodeSelection;
|
|
4655
4659
|
this.selection_H.evaluateSelection(items, si);
|
|
4656
4660
|
}
|