@esfaenza/es-table 15.2.7 → 15.2.9
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 +24 -12
- package/fesm2015/esfaenza-es-table.mjs +23 -11
- package/fesm2015/esfaenza-es-table.mjs.map +1 -1
- package/fesm2020/esfaenza-es-table.mjs +23 -11
- package/fesm2020/esfaenza-es-table.mjs.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +5 -1
- package/package.json +1 -1
|
@@ -4430,11 +4430,8 @@ class EsTableComponent {
|
|
|
4430
4430
|
let firstItemGroupOrNoGrouping = (((_a = this.View.requestedgroups) === null || _a === void 0 ? void 0 : _a.length) || 0) == 0;
|
|
4431
4431
|
// Se vengo da una ricerca interna mantengo lo stato di selezione precedente (quindi su cambio pagina, cambio ipp, ecc...)
|
|
4432
4432
|
// se invece l'utente ha fatto una ricerca lui (quindi cambiando filtri), secco le info di selezione
|
|
4433
|
-
if (!this.View.selection || (!this.View.internalsearchrequest && firstItemGroupOrNoGrouping) || !this.UseSelectionCache)
|
|
4434
|
-
this.
|
|
4435
|
-
this.View.selection = new ItemsSelection([]);
|
|
4436
|
-
this.onSelectionChanged.emit(this.View.selection);
|
|
4437
|
-
}
|
|
4433
|
+
if (!this.View.selection || (!this.View.internalsearchrequest && firstItemGroupOrNoGrouping) || !this.UseSelectionCache)
|
|
4434
|
+
this.resetSelection(true);
|
|
4438
4435
|
this.View.internalsearchrequest = false;
|
|
4439
4436
|
// Recupero Preference
|
|
4440
4437
|
if (this.SavePreferences) {
|
|
@@ -4494,11 +4491,8 @@ class EsTableComponent {
|
|
|
4494
4491
|
}
|
|
4495
4492
|
else if (this.View && (this.View.length != null && this.View.length != undefined)) {
|
|
4496
4493
|
this.setMode('array');
|
|
4497
|
-
if (!this.UseSelectionCache || !this.arraymodeSelection)
|
|
4498
|
-
this.
|
|
4499
|
-
this.arraymodeSelection = new ItemsSelection([]);
|
|
4500
|
-
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4501
|
-
}
|
|
4494
|
+
if (!this.UseSelectionCache || !this.arraymodeSelection)
|
|
4495
|
+
this.resetSelection(true);
|
|
4502
4496
|
// Recupero Preference
|
|
4503
4497
|
if (this.SavePreferences) {
|
|
4504
4498
|
if (!this.ngControl.name)
|
|
@@ -4768,7 +4762,7 @@ class EsTableComponent {
|
|
|
4768
4762
|
* @param {any[]} items Oggetti da selezionare o deselezionare
|
|
4769
4763
|
* @param {boolean} select **true** per selezionarli, **false** per non toccarli
|
|
4770
4764
|
*/
|
|
4771
|
-
setSelectionStatus(items, all, select) {
|
|
4765
|
+
setSelectionStatus(items, all, select, emit = false) {
|
|
4772
4766
|
var _a;
|
|
4773
4767
|
if (all) {
|
|
4774
4768
|
if (!this.SelectAll) {
|
|
@@ -4783,6 +4777,24 @@ class EsTableComponent {
|
|
|
4783
4777
|
else
|
|
4784
4778
|
this.selection_H.handleItemsSelection(items, select);
|
|
4785
4779
|
this.cdr.markForCheck();
|
|
4780
|
+
if (emit)
|
|
4781
|
+
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4782
|
+
}
|
|
4783
|
+
/**
|
|
4784
|
+
* Effettua un hard reset della selezione
|
|
4785
|
+
*/
|
|
4786
|
+
resetSelection(emit = false) {
|
|
4787
|
+
this.selection_H.clearSelectionCaches();
|
|
4788
|
+
if (this.viewMode && this.View) {
|
|
4789
|
+
this.View.selection = new ItemsSelection([]);
|
|
4790
|
+
if (emit)
|
|
4791
|
+
this.onSelectionChanged.emit(this.View.selection);
|
|
4792
|
+
}
|
|
4793
|
+
else if (this.arrayMode) {
|
|
4794
|
+
this.arraymodeSelection = new ItemsSelection([]);
|
|
4795
|
+
if (emit)
|
|
4796
|
+
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4797
|
+
}
|
|
4786
4798
|
}
|
|
4787
4799
|
/**
|
|
4788
4800
|
* Metodo che gestisce il cambio di Ordinamento di una colonna
|