@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.
|
@@ -4316,8 +4316,12 @@ class EsTableComponent {
|
|
|
4316
4316
|
registerOnTouched(fn) { }
|
|
4317
4317
|
/** @ignore */
|
|
4318
4318
|
changed(clearItems = false) {
|
|
4319
|
-
if (clearItems && this.viewMode)
|
|
4320
|
-
this.
|
|
4319
|
+
if (clearItems && this.viewMode) {
|
|
4320
|
+
if (!this.ItemSourceProperty)
|
|
4321
|
+
this.View.items = [];
|
|
4322
|
+
else
|
|
4323
|
+
this.View[this.ItemSourceProperty] = [];
|
|
4324
|
+
}
|
|
4321
4325
|
this.propagateChange(this.View);
|
|
4322
4326
|
}
|
|
4323
4327
|
/** @ignore */
|
|
@@ -4408,7 +4412,7 @@ class EsTableComponent {
|
|
|
4408
4412
|
}
|
|
4409
4413
|
// 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)
|
|
4410
4414
|
if (firstItemGroupOrNoGrouping)
|
|
4411
|
-
this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.View.page, this.View.pages || 1, this.View.items.length, this.View.itemsperpageoverride);
|
|
4415
|
+
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);
|
|
4412
4416
|
}
|
|
4413
4417
|
else if (this.View && (this.View.length != null && this.View.length != undefined)) {
|
|
4414
4418
|
this.setMode('array');
|
|
@@ -4560,7 +4564,7 @@ class EsTableComponent {
|
|
|
4560
4564
|
// Molte cose sono ovviamente disponibili solo in modalità View
|
|
4561
4565
|
if ((this.viewMode || this.arrayMode) && this.UseCustomCells) {
|
|
4562
4566
|
let view = this.viewMode ? View : null;
|
|
4563
|
-
let itemsAndGroups = this.viewMode ? [...(view.items || []), ...(view.groups || [])] : View;
|
|
4567
|
+
let itemsAndGroups = this.viewMode ? [...((this.ItemSourceProperty ? view[this.ItemSourceProperty] : view.items) || []), ...(view.groups || [])] : View;
|
|
4564
4568
|
let si = this.viewMode ? view.selection : this.arraymodeSelection;
|
|
4565
4569
|
// N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
|
|
4566
4570
|
// ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
|
|
@@ -4617,7 +4621,7 @@ class EsTableComponent {
|
|
|
4617
4621
|
}
|
|
4618
4622
|
else if ((this.viewMode || this.arrayMode) && !this.UseCustomCells) {
|
|
4619
4623
|
// Riallineo le info di selezione degli elementi della View
|
|
4620
|
-
let items = this.viewMode ? View.items : View;
|
|
4624
|
+
let items = this.viewMode ? (this.ItemSourceProperty ? View[this.ItemSourceProperty] : View.items) : View;
|
|
4621
4625
|
let si = this.viewMode ? View.selection : this.arraymodeSelection;
|
|
4622
4626
|
this.selection_H.evaluateSelection(items, si);
|
|
4623
4627
|
}
|