@esfaenza/es-table 11.2.146 → 11.2.148
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 +26 -11
- 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/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +25 -12
- package/fesm2015/esfaenza-es-table.js +24 -11
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +5 -1
- package/package.json +1 -1
|
@@ -3968,11 +3968,8 @@ class EsTableComponent {
|
|
|
3968
3968
|
let firstItemGroupOrNoGrouping = (((_a = this.View.requestedgroups) === null || _a === void 0 ? void 0 : _a.length) || 0) == 0;
|
|
3969
3969
|
// Se vengo da una ricerca interna mantengo lo stato di selezione precedente (quindi su cambio pagina, cambio ipp, ecc...)
|
|
3970
3970
|
// se invece l'utente ha fatto una ricerca lui (quindi cambiando filtri), secco le info di selezione
|
|
3971
|
-
if (!this.View.selection || (!this.View.internalsearchrequest && firstItemGroupOrNoGrouping) || !this.UseSelectionCache)
|
|
3972
|
-
this.
|
|
3973
|
-
this.View.selection = new ItemsSelection([]);
|
|
3974
|
-
this.onSelectionChanged.emit(this.View.selection);
|
|
3975
|
-
}
|
|
3971
|
+
if (!this.View.selection || (!this.View.internalsearchrequest && firstItemGroupOrNoGrouping) || !this.UseSelectionCache)
|
|
3972
|
+
this.resetSelection(true);
|
|
3976
3973
|
this.View.internalsearchrequest = false;
|
|
3977
3974
|
// Recupero Preference
|
|
3978
3975
|
if (this.SavePreferences) {
|
|
@@ -4032,11 +4029,8 @@ class EsTableComponent {
|
|
|
4032
4029
|
}
|
|
4033
4030
|
else if (this.View && (this.View.length != null && this.View.length != undefined)) {
|
|
4034
4031
|
this.setMode('array');
|
|
4035
|
-
if (!this.UseSelectionCache || !this.arraymodeSelection)
|
|
4036
|
-
this.
|
|
4037
|
-
this.arraymodeSelection = new ItemsSelection([]);
|
|
4038
|
-
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4039
|
-
}
|
|
4032
|
+
if (!this.UseSelectionCache || !this.arraymodeSelection)
|
|
4033
|
+
this.resetSelection(true);
|
|
4040
4034
|
// Recupero Preference
|
|
4041
4035
|
if (this.SavePreferences) {
|
|
4042
4036
|
if (!this.ngControl.name)
|
|
@@ -4306,7 +4300,7 @@ class EsTableComponent {
|
|
|
4306
4300
|
* @param {any[]} items Oggetti da selezionare o deselezionare
|
|
4307
4301
|
* @param {boolean} select **true** per selezionarli, **false** per non toccarli
|
|
4308
4302
|
*/
|
|
4309
|
-
setSelectionStatus(items, all, select) {
|
|
4303
|
+
setSelectionStatus(items, all, select, emit = false) {
|
|
4310
4304
|
var _a;
|
|
4311
4305
|
if (all) {
|
|
4312
4306
|
if (!this.SelectAll) {
|
|
@@ -4321,6 +4315,25 @@ class EsTableComponent {
|
|
|
4321
4315
|
else
|
|
4322
4316
|
this.selection_H.handleItemsSelection(items, select);
|
|
4323
4317
|
this.cdr.markForCheck();
|
|
4318
|
+
if (emit)
|
|
4319
|
+
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4320
|
+
}
|
|
4321
|
+
/**
|
|
4322
|
+
* Effettua un hard reset della selezione
|
|
4323
|
+
*/
|
|
4324
|
+
resetSelection(emit = false) {
|
|
4325
|
+
var _a;
|
|
4326
|
+
this.selection_H.clearSelectionCaches();
|
|
4327
|
+
if ((_a = this.View) === null || _a === void 0 ? void 0 : _a.selection) {
|
|
4328
|
+
this.View.selection = new ItemsSelection([]);
|
|
4329
|
+
if (emit)
|
|
4330
|
+
this.onSelectionChanged.emit(this.View.selection);
|
|
4331
|
+
}
|
|
4332
|
+
else if (this.arraymodeSelection) {
|
|
4333
|
+
this.arraymodeSelection = new ItemsSelection([]);
|
|
4334
|
+
if (emit)
|
|
4335
|
+
this.onSelectionChanged.emit(this.arraymodeSelection);
|
|
4336
|
+
}
|
|
4324
4337
|
}
|
|
4325
4338
|
/**
|
|
4326
4339
|
* Metodo che gestisce il cambio di Ordinamento di una colonna
|