@esfaenza/es-table 15.2.26 → 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.
- package/esm2020/lib/components/es-table/es_table.component.mjs +10 -6
- package/esm2020/lib/core/handlers/ColumnMetadataHandler.mjs +14 -2
- package/fesm2015/esfaenza-es-table.mjs +22 -6
- package/fesm2015/esfaenza-es-table.mjs.map +1 -1
- package/fesm2020/esfaenza-es-table.mjs +22 -6
- package/fesm2020/esfaenza-es-table.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -939,7 +939,19 @@ class ColumnMetadataHandler {
|
|
|
939
939
|
let newColset = [];
|
|
940
940
|
if (!this.est.ColumnsList || this.est.ColumnsList.length == 0)
|
|
941
941
|
return;
|
|
942
|
-
let columns =
|
|
942
|
+
let columns = [];
|
|
943
|
+
// Modlaità view ->
|
|
944
|
+
if (this.est.viewMode) {
|
|
945
|
+
// colonne dinamiche -> prendo l'insieme delle colonne e operazioni dinamiche definite
|
|
946
|
+
// standard -> prendo le colonne della view
|
|
947
|
+
if (this.est.DynamicRowColumnsDefinition)
|
|
948
|
+
columns = [...(this.est.DynamicRowColumnsDefinition?.map(t => t.PropertyName) || []), ...(this.est.DynamicOperations?.map(t => t.id) || [])];
|
|
949
|
+
else
|
|
950
|
+
columns = view.columns;
|
|
951
|
+
}
|
|
952
|
+
// Modalità array -> prendo le colonne array
|
|
953
|
+
else
|
|
954
|
+
columns = this.est.arrayColumns;
|
|
943
955
|
this.est.ColumnsList.forEach(c => {
|
|
944
956
|
// Se la colonna è pinnata mi arriva col simoleon, ma anche se è una composizione di più colonne
|
|
945
957
|
let exCl = columns.filter(cc => (cc.startsWith('§') ? cc.substring(1) : cc) == c.id);
|
|
@@ -4304,8 +4316,12 @@ class EsTableComponent {
|
|
|
4304
4316
|
registerOnTouched(fn) { }
|
|
4305
4317
|
/** @ignore */
|
|
4306
4318
|
changed(clearItems = false) {
|
|
4307
|
-
if (clearItems && this.viewMode)
|
|
4308
|
-
this.
|
|
4319
|
+
if (clearItems && this.viewMode) {
|
|
4320
|
+
if (!this.ItemSourceProperty)
|
|
4321
|
+
this.View.items = [];
|
|
4322
|
+
else
|
|
4323
|
+
this.View[this.ItemSourceProperty] = [];
|
|
4324
|
+
}
|
|
4309
4325
|
this.propagateChange(this.View);
|
|
4310
4326
|
}
|
|
4311
4327
|
/** @ignore */
|
|
@@ -4396,7 +4412,7 @@ class EsTableComponent {
|
|
|
4396
4412
|
}
|
|
4397
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)
|
|
4398
4414
|
if (firstItemGroupOrNoGrouping)
|
|
4399
|
-
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);
|
|
4400
4416
|
}
|
|
4401
4417
|
else if (this.View && (this.View.length != null && this.View.length != undefined)) {
|
|
4402
4418
|
this.setMode('array');
|
|
@@ -4548,7 +4564,7 @@ class EsTableComponent {
|
|
|
4548
4564
|
// Molte cose sono ovviamente disponibili solo in modalità View
|
|
4549
4565
|
if ((this.viewMode || this.arrayMode) && this.UseCustomCells) {
|
|
4550
4566
|
let view = this.viewMode ? View : null;
|
|
4551
|
-
let itemsAndGroups = this.viewMode ? [...(view.items || []), ...(view.groups || [])] : View;
|
|
4567
|
+
let itemsAndGroups = this.viewMode ? [...((this.ItemSourceProperty ? view[this.ItemSourceProperty] : view.items) || []), ...(view.groups || [])] : View;
|
|
4552
4568
|
let si = this.viewMode ? view.selection : this.arraymodeSelection;
|
|
4553
4569
|
// N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
|
|
4554
4570
|
// ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
|
|
@@ -4605,7 +4621,7 @@ class EsTableComponent {
|
|
|
4605
4621
|
}
|
|
4606
4622
|
else if ((this.viewMode || this.arrayMode) && !this.UseCustomCells) {
|
|
4607
4623
|
// Riallineo le info di selezione degli elementi della View
|
|
4608
|
-
let items = this.viewMode ? View.items : View;
|
|
4624
|
+
let items = this.viewMode ? (this.ItemSourceProperty ? View[this.ItemSourceProperty] : View.items) : View;
|
|
4609
4625
|
let si = this.viewMode ? View.selection : this.arraymodeSelection;
|
|
4610
4626
|
this.selection_H.evaluateSelection(items, si);
|
|
4611
4627
|
}
|