@esfaenza/es-table 11.2.22-beta23 → 11.2.22-beta27
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 +20 -5
- 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 +11 -3
- package/esm2015/lib/core/handlers/classes/ItemsHandler.js +11 -4
- package/fesm2015/esfaenza-es-table.js +20 -5
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/package.json +1 -1
|
@@ -2077,10 +2077,13 @@
|
|
|
2077
2077
|
// Se faccio dei raggruppamenti ignoro la paginazione
|
|
2078
2078
|
if (this.est.UseArrayModePaging && !allIfPossible) {
|
|
2079
2079
|
// Se sono in modalità array ma la ricerca dipende da una view devo riallineare gli itemperpage
|
|
2080
|
-
if (this.est.SearchView)
|
|
2080
|
+
if (this.est.SearchView) {
|
|
2081
2081
|
this.est.ArraymodeItemsPerPage = this.est.SearchView.itemsperpageoverride;
|
|
2082
|
+
this.est.arraymodePage = this.est.SearchView.page;
|
|
2083
|
+
this.est.arraymodePages = this.est.SearchView.pages;
|
|
2084
|
+
}
|
|
2082
2085
|
// Devo chiamare il refresh page solo se vengo richiamato da un binding esterno
|
|
2083
|
-
if (refreshPaging)
|
|
2086
|
+
else if (refreshPaging)
|
|
2084
2087
|
this.refreshPaging(this.est.ArraymodeItemsPerPage);
|
|
2085
2088
|
items = this.adaptViewToPaging();
|
|
2086
2089
|
}
|
|
@@ -2136,9 +2139,13 @@
|
|
|
2136
2139
|
/** Genera le informazioni di paginazione e taglia la View in modalità array per mostrare solo gli oggetti della pagina specificata */
|
|
2137
2140
|
ItemsHandler.prototype.adaptViewToPaging = function () {
|
|
2138
2141
|
var tmpItems = [];
|
|
2139
|
-
// Se ho una search view l'array pulsanti viene calcolato da lei, non devo prendere quello della modalità array
|
|
2142
|
+
// Se ho una search view l'array pulsanti viene calcolato da lei, non devo prendere quello della modalità array,
|
|
2143
|
+
// inoltre non ho bisogno di fare ragionamenti su quanti elementi ci sono e sulla pagina, dato che viene tutto gestito esternamente,
|
|
2144
|
+
// unendo al risultato della view tutti gli oggetti addizionali
|
|
2140
2145
|
if (!this.est.SearchView)
|
|
2141
2146
|
this.est.arrayPulsanti = this.utilities.getPagesArray(6, this.est.arraymodePage, this.est.arraymodePages);
|
|
2147
|
+
else
|
|
2148
|
+
return this.est.View;
|
|
2142
2149
|
// Poi per tutti i valori dopo compresi fra la pagina - 1 e la pagina
|
|
2143
2150
|
for (var i = ((this.est.arraymodePage - 1) * this.est.ArraymodeItemsPerPage); i < this.est.arraymodePage * this.est.ArraymodeItemsPerPage; i++) {
|
|
2144
2151
|
if (i <= this.est.View.length - 1)
|
|
@@ -3961,7 +3968,6 @@
|
|
|
3961
3968
|
if (!this.UseSelectionCache || !this.arraymodeSelection) {
|
|
3962
3969
|
this.selection_H.clearSelectionCaches();
|
|
3963
3970
|
this.arraymodeSelection = new ItemsSelection([]);
|
|
3964
|
-
;
|
|
3965
3971
|
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
3966
3972
|
}
|
|
3967
3973
|
// Recupero Preference
|
|
@@ -4033,7 +4039,10 @@
|
|
|
4033
4039
|
};
|
|
4034
4040
|
/** Genera le informzioni di paginazione per la vista globale dell'es-table */
|
|
4035
4041
|
EsTableComponent.prototype.setupPagingInformations = function () {
|
|
4042
|
+
var _a;
|
|
4043
|
+
// Default che valgono di base, poi eventualmente moddati dalle funzioni sotto
|
|
4036
4044
|
this.PagerOptions.ShowCount = !this.HidePagingCount;
|
|
4045
|
+
this.PagerOptions.UsesView = true;
|
|
4037
4046
|
if (this.arrayMode && this.UseArrayModePaging && !this.SearchView) {
|
|
4038
4047
|
this.PagerOptions.PagerCount = this.View.length || 0;
|
|
4039
4048
|
this.PagerOptions.ShowPaging = !this.HidePaging && this.View.length > 10;
|
|
@@ -4047,6 +4056,7 @@
|
|
|
4047
4056
|
}
|
|
4048
4057
|
else
|
|
4049
4058
|
this.PagerOptions.PagerCount = this.View.length || 0;
|
|
4059
|
+
this.PagerOptions.ShowPaging = !this.HidePaging && (this.View.length > 10 || (((_a = this.SearchView) === null || _a === void 0 ? void 0 : _a.objectcount) || 0) > 10);
|
|
4050
4060
|
this.PagerOptions.ShowCount = this.PagerOptions.ShowCount || (this.View && this.View.length) || (this.SearchView && this.SearchView.objectcount && this.SearchView.objectcount != -1);
|
|
4051
4061
|
}
|
|
4052
4062
|
else if (this.viewMode) {
|
|
@@ -4540,7 +4550,7 @@
|
|
|
4540
4550
|
var ipp = this.reportMode ? (view.itemsperpageoverride || 15) : view.itemsperpageoverride || 15;
|
|
4541
4551
|
this.arrayPulsanti = this.utilities_H.getPagesArray(6, appSearchElement.page, appSearchElement.pages, count, ipp);
|
|
4542
4552
|
var hasGroupings = !!this.MainGroupView;
|
|
4543
|
-
this.emitSearchRequest(false, hasGroupings ? view : null);
|
|
4553
|
+
this.emitSearchRequest(false, hasGroupings ? view : this.SearchView ? this.SearchView : null);
|
|
4544
4554
|
};
|
|
4545
4555
|
/**
|
|
4546
4556
|
* Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest**
|
|
@@ -4551,6 +4561,11 @@
|
|
|
4551
4561
|
this.changed();
|
|
4552
4562
|
if (this.MainGroupView)
|
|
4553
4563
|
this.emitSearchRequest(true, this.MainGroupView);
|
|
4564
|
+
else if (this.SearchView) {
|
|
4565
|
+
// Questo secondo me si può portare a livello un po' più alto
|
|
4566
|
+
this.SearchView.page = 1;
|
|
4567
|
+
this.emitSearchRequest(true, this.SearchView);
|
|
4568
|
+
}
|
|
4554
4569
|
else
|
|
4555
4570
|
this.emitSearchRequest(true);
|
|
4556
4571
|
};
|