@esfaenza/es-table 11.2.99 → 11.2.100
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/bundles/esfaenza-es-table.umd.js +13 -8
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +2 -4
- package/esm2015/lib/core/handlers/ItemsHandler.js +13 -5
- package/fesm2015/esfaenza-es-table.js +13 -7
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/core/handlers/ItemsHandler.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2107,18 +2107,25 @@
|
|
|
2107
2107
|
this.est.arrayPulsanti = this.utilities.getPagesArray(6, this.est.arraymodePage, this.est.arraymodePages);
|
|
2108
2108
|
else
|
|
2109
2109
|
return this.est.View;
|
|
2110
|
+
// Applico eventuali oridnamenti lato Array prima di tirare fuori la pagina selezionata
|
|
2111
|
+
var items = this.est.View;
|
|
2112
|
+
if (this.est)
|
|
2113
|
+
items = this.arrayModeReviewOrderings(items);
|
|
2110
2114
|
// Poi per tutti i valori dopo compresi fra la pagina - 1 e la pagina
|
|
2111
2115
|
for (var i = ((this.est.arraymodePage - 1) * this.est.ArraymodeItemsPerPage); i < this.est.arraymodePage * this.est.ArraymodeItemsPerPage; i++) {
|
|
2112
|
-
if (i <=
|
|
2113
|
-
tmpItems.push(
|
|
2116
|
+
if (i <= items.length - 1)
|
|
2117
|
+
tmpItems.push(items);
|
|
2114
2118
|
}
|
|
2115
2119
|
return tmpItems;
|
|
2116
2120
|
};
|
|
2117
2121
|
/** Se in modalità array applica gli ordinamenti ASC-DESC delle colonne */
|
|
2118
|
-
ItemsHandler.prototype.arrayModeReviewOrderings = function () {
|
|
2119
|
-
var
|
|
2122
|
+
ItemsHandler.prototype.arrayModeReviewOrderings = function (items) {
|
|
2123
|
+
var tmp = items;
|
|
2120
2124
|
if (this.est.arrayOrders.length > 0)
|
|
2121
|
-
this.est.arrayOrders.forEach(function (t) {
|
|
2125
|
+
this.est.arrayOrders.forEach(function (t) {
|
|
2126
|
+
tmp = tmp.sort(function (a, b) { return (a[t.id] > b[t.id] ? 1 : -1) * (t.order == 'DESC' ? -1 : 1); });
|
|
2127
|
+
});
|
|
2128
|
+
return tmp;
|
|
2122
2129
|
};
|
|
2123
2130
|
return ItemsHandler;
|
|
2124
2131
|
}());
|
|
@@ -4486,10 +4493,8 @@
|
|
|
4486
4493
|
}
|
|
4487
4494
|
// Prepassaggio per tirare fuori tutte le info utili sugli headers in modo da non ricacolarseli sempre dopo
|
|
4488
4495
|
var hI = this.columnMetadata_H.evaluateHeadersGroupingInfos(ths);
|
|
4489
|
-
if (this.arrayMode)
|
|
4490
|
-
this.items_H.arrayModeReviewOrderings(); // ... quindi gli ordinamenti li devo fare lato client, e ...
|
|
4496
|
+
if (this.arrayMode) // In modalità array non ho un backend...
|
|
4491
4497
|
this.rowGrouping_H.arrayModeReviewGroupings(hI.leafs); // ... i raggruppamenti li devo fare lato client
|
|
4492
|
-
}
|
|
4493
4498
|
this.columnMetadata_H.reviewColumnsList(hI.leafs); // Aggiorna la lista delle colonne da mostrare nella dialog per ordinamento ecc
|
|
4494
4499
|
this.columnMetadata_H.alignColumnsIfLoadedView(view); // Se sto caricando una View da hotpotato (quindi con savedstate = true) riallineo la visibilità delle colonne e il loro ordine.
|
|
4495
4500
|
this.columnMetadata_H.moveFixedColumnsAtTheBeginning(hI.leafs, tds); // Sposto tutte le cose fixed all'inizio in modo che la creazione di th e td sia più snella (Utilizza le ColumnsList, quindi dev'essere richiamata PIRMA di reviewColumnsList)
|