@esfaenza/es-table 11.2.150 → 11.2.152

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.
@@ -1,7 +1,17 @@
1
1
  import { ContentChildren, Directive } from '@angular/core';
2
2
  import { EsTdDirective } from './es_td.directive';
3
3
  import { EsThDirective } from './es_th.directive';
4
+ import { Subject } from 'rxjs';
4
5
  export class ThTdProvider {
6
+ constructor() {
7
+ this.LoadedSignal = new Subject();
8
+ }
9
+ setLoaded() {
10
+ requestAnimationFrame(() => {
11
+ this.LoadedSignal.next();
12
+ this.LoadedSignal.complete();
13
+ });
14
+ }
5
15
  }
6
16
  ThTdProvider.decorators = [
7
17
  { type: Directive, args: [{ selector: '[td_th_provider]' },] }
@@ -10,4 +20,4 @@ ThTdProvider.propDecorators = {
10
20
  EsTdsDirective: [{ type: ContentChildren, args: [EsTdDirective,] }],
11
21
  EsThsDirective: [{ type: ContentChildren, args: [EsThDirective,] }]
12
22
  };
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNfdGhfdGRfcHJvdmlkZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXMtdGFibGUvc3JjL2xpYi9kaXJlY3RpdmVzL2VzX3RoX3RkX3Byb3ZpZGVyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZUFBZSxFQUFFLFNBQVMsRUFBYSxNQUFNLGVBQWUsQ0FBQztBQUN0RSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBR2xELE1BQU0sT0FBTyxZQUFZOzs7WUFEeEIsU0FBUyxTQUFDLEVBQUUsUUFB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2ZTogUXVlcnlMaXN0PEVzVGREaXJlY3RpdmU+O1xyXG4gICAgQENvbnRlbnRDaGlsZHJlbihFc1RoRGlyZWN0aXZlKSBFc1Roc0RpcmVjdGl2ZTogUXVlcnlMaXN0PEVzVGhEaXJlY3RpdmU+O1xyXG5cclxuICAgIHB1YmxpYyBMb2FkZWRTaWduYWw6IFN1YmplY3Q8dm9pZD4gPSBuZXcgU3ViamVjdDx2b2lkPigpO1xyXG5cclxuICAgIHB1YmxpYyBzZXRMb2FkZWQoKSB7XHJcbiAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5Mb2FkZWRTaWduYWwubmV4dCgpO1xyXG4gICAgICAgICAgICB0aGlzLkxvYWRlZFNpZ25hbC5jb21wbGV0ZSgpO1xyXG4gICAgICAgIH0pXHJcbiAgICB9XHJcbn0iXX0=
@@ -4,8 +4,8 @@ import { MessageService, HashingService, UtilityService, ExportService, DateServ
4
4
  import { __awaiter } from 'tslib';
5
5
  import { NgControl, FormsModule } from '@angular/forms';
6
6
  import { PreferencesService } from '@esfaenza/preferences';
7
+ import { Subject, forkJoin } from 'rxjs';
7
8
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
8
- import { Subject } from 'rxjs';
9
9
  import { CommonModule } from '@angular/common';
10
10
  import { RouterModule } from '@angular/router';
11
11
  import { MatSelectModule } from '@angular/material/select';
@@ -425,6 +425,15 @@ EsTdEditorDirective.propDecorators = {
425
425
  };
426
426
 
427
427
  class ThTdProvider {
428
+ constructor() {
429
+ this.LoadedSignal = new Subject();
430
+ }
431
+ setLoaded() {
432
+ requestAnimationFrame(() => {
433
+ this.LoadedSignal.next();
434
+ this.LoadedSignal.complete();
435
+ });
436
+ }
428
437
  }
429
438
  ThTdProvider.decorators = [
430
439
  { type: Directive, args: [{ selector: '[td_th_provider]' },] }
@@ -3890,35 +3899,38 @@ class EsTableComponent {
3890
3899
  /** @ignore */
3891
3900
  ngAfterViewInit() {
3892
3901
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
3893
- // Se utilizzo la new spicy mode deduco tutti i parametri di lavoro possibili al caricamento della tabella
3894
- // Vengono sovrascritte solo le proprietà non impostate dall'utente
3895
- this.EsTds = (this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective).toArray();
3896
- this.EsThs = (this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective).toArray();
3897
- if (((_l = this.ThTdProvider) === null || _l === void 0 ? void 0 : _l.length) > 0) {
3898
- this.EsTds = [...this.EsTds, ...this.ThTdProvider.map(t => t.EsTdsDirective.toArray()).flat()];
3899
- this.EsThs = [...this.EsThs, ...this.ThTdProvider.map(t => t.EsThsDirective.toArray()).flat()];
3900
- }
3901
- let usesThsAndTdsDirectives = ((_m = this.EsTds) === null || _m === void 0 ? void 0 : _m.length) > 0 && ((_o = this.EsThs) === null || _o === void 0 ? void 0 : _o.length) > 0;
3902
- let hasNoContentProjection = !this.bodyRef && !this.headerRef && !this.headerGroupRef && !this.secondaryHeaderGroupRef;
3903
- if (usesThsAndTdsDirectives || hasNoContentProjection) {
3904
- if (this.UseCustomCells == null)
3905
- this.UseCustomCells = true;
3906
- if (this.HiddenColumns == null && this.UseCustomCells)
3907
- this.HiddenColumns = true;
3908
- if (this.ColumnsOrdering == null && this.UseCustomCells)
3909
- this.ColumnsOrdering = true;
3910
- if (this.OrderByColumn == null && this.UseCustomCells)
3911
- this.OrderByColumn = true;
3912
- if (this.SelectAll == null && this.Selection)
3913
- this.SelectAll = true;
3914
- if (this.ShiftClick == null && this.Selection)
3915
- this.ShiftClick = true;
3916
- this.DirectivesBased = true;
3917
- }
3918
- //Per poter cambiare il layout in base al livello gerarchico il componente deva avere il pieno controllo di ogni cella,
3919
- //che con solo la proiezione (senza celle cusotm) non è disponibile
3920
- if (this.Hierarchy && !this.UseCustomCells)
3921
- throw "Es-table error: Per poter utilizzare l'es-table con [Hierarchy]=\"true\" è richiesto anche [UseCustomCells]=\"true\"";
3902
+ return __awaiter(this, void 0, void 0, function* () {
3903
+ // Se utilizzo la new spicy mode deduco tutti i parametri di lavoro possibili al caricamento della tabella
3904
+ // Vengono sovrascritte solo le proprietà non impostate dall'utente
3905
+ this.EsTds = (this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective).toArray();
3906
+ this.EsThs = (this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective).toArray();
3907
+ if (((_l = this.ThTdProvider) === null || _l === void 0 ? void 0 : _l.length) > 0) {
3908
+ yield forkJoin(this.ThTdProvider.map(t => t.LoadedSignal)).toPromise();
3909
+ this.EsTds = [...this.EsTds, ...this.ThTdProvider.map(t => t.EsTdsDirective.toArray()).flat()];
3910
+ this.EsThs = [...this.EsThs, ...this.ThTdProvider.map(t => t.EsThsDirective.toArray()).flat()];
3911
+ }
3912
+ let usesThsAndTdsDirectives = ((_m = this.EsTds) === null || _m === void 0 ? void 0 : _m.length) > 0 && ((_o = this.EsThs) === null || _o === void 0 ? void 0 : _o.length) > 0;
3913
+ let hasNoContentProjection = !this.bodyRef && !this.headerRef && !this.headerGroupRef && !this.secondaryHeaderGroupRef;
3914
+ if (usesThsAndTdsDirectives || hasNoContentProjection) {
3915
+ if (this.UseCustomCells == null)
3916
+ this.UseCustomCells = true;
3917
+ if (this.HiddenColumns == null && this.UseCustomCells)
3918
+ this.HiddenColumns = true;
3919
+ if (this.ColumnsOrdering == null && this.UseCustomCells)
3920
+ this.ColumnsOrdering = true;
3921
+ if (this.OrderByColumn == null && this.UseCustomCells)
3922
+ this.OrderByColumn = true;
3923
+ if (this.SelectAll == null && this.Selection)
3924
+ this.SelectAll = true;
3925
+ if (this.ShiftClick == null && this.Selection)
3926
+ this.ShiftClick = true;
3927
+ this.DirectivesBased = true;
3928
+ }
3929
+ //Per poter cambiare il layout in base al livello gerarchico il componente deva avere il pieno controllo di ogni cella,
3930
+ //che con solo la proiezione (senza celle cusotm) non è disponibile
3931
+ if (this.Hierarchy && !this.UseCustomCells)
3932
+ throw "Es-table error: Per poter utilizzare l'es-table con [Hierarchy]=\"true\" è richiesto anche [UseCustomCells]=\"true\"";
3933
+ });
3922
3934
  }
3923
3935
  /** @ignore */
3924
3936
  ngOnDestroy() {
@@ -4180,81 +4192,85 @@ class EsTableComponent {
4180
4192
  }
4181
4193
  /** Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive */
4182
4194
  internalPostBoundSource() {
4183
- var _a;
4184
- let View = this.View;
4185
- // Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
4186
- this.dynamicMode_H.eventuallyReviewDynamicColumns();
4187
- // Gestisce la richiesta per gruppi o per singoli oggetti
4188
- this.bindDisplayToLoadedItemsOrGroups(View);
4189
- // Questo dev'essere per forza lanciato dopo **bindDisplayToLoadedItemsOrGroups** dato che è lì che alcune cose vengono valorizzate
4190
- this.setupPagingInformations();
4191
- // Molte cose sono ovviamente disponibili solo in modalità View
4192
- if ((this.viewMode || this.arrayMode) && this.UseCustomCells) {
4193
- let view = this.viewMode ? View : null;
4194
- let itemsAndGroups = this.viewMode ? [...(view.items || []), ...(view.groups || [])] : View;
4195
- let si = this.viewMode ? view.selection : this.arraymodeSelection;
4196
- // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4197
- // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4198
- // Se ho definizioni dinamiche, prima di qualsiasi altra cosa devo trasformarle in th/td in modo che poi il codice qui sotto faccia le sue magie
4199
- if (((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4200
- this.logger.log("Generating ths and tds from Dynamic definition");
4201
- let ret = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4202
- this.EsThs = ret.ths;
4203
- this.EsTds = ret.tds;
4204
- }
4205
- // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4206
- if (!this.arrayMode && view.report_columns) {
4207
- this.logger.log("Generating ths and tds from report results");
4208
- let ret = this.reportMode_H.generateThsAndTdsFromView(view);
4209
- this.EsThs = ret.ths;
4210
- this.EsTds = ret.tds;
4211
- }
4212
- // Espando i th e i td multipli duplicandoli
4213
- let ret = this.columnMetadata_H.expandMultiThsAndTds(this.EsThs, this.EsTds, itemsAndGroups);
4214
- this.EsThs = ret.expThs;
4215
- this.EsTds = ret.expTds;
4216
- // Genero la cache dei th da usare da qui in poi, dopo avergli lasciato fare le sue cose in caso ci siano dei multi o dei report
4217
- for (let i = 0; i < this.EsThs.length; i++) {
4218
- let th = this.EsThs[i];
4219
- this.thsCache[th.th] = th;
4195
+ var _a, _b;
4196
+ return __awaiter(this, void 0, void 0, function* () {
4197
+ let View = this.View;
4198
+ if (((_a = this.ThTdProvider) === null || _a === void 0 ? void 0 : _a.length) > 0)
4199
+ yield forkJoin(this.ThTdProvider.map(t => t.LoadedSignal)).toPromise();
4200
+ // Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
4201
+ this.dynamicMode_H.eventuallyReviewDynamicColumns();
4202
+ // Gestisce la richiesta per gruppi o per singoli oggetti
4203
+ this.bindDisplayToLoadedItemsOrGroups(View);
4204
+ // Questo dev'essere per forza lanciato dopo **bindDisplayToLoadedItemsOrGroups** dato che è lì che alcune cose vengono valorizzate
4205
+ this.setupPagingInformations();
4206
+ // Molte cose sono ovviamente disponibili solo in modalità View
4207
+ if ((this.viewMode || this.arrayMode) && this.UseCustomCells) {
4208
+ let view = this.viewMode ? View : null;
4209
+ let itemsAndGroups = this.viewMode ? [...(view.items || []), ...(view.groups || [])] : View;
4210
+ let si = this.viewMode ? view.selection : this.arraymodeSelection;
4211
+ // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4212
+ // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4213
+ // Se ho definizioni dinamiche, prima di qualsiasi altra cosa devo trasformarle in th/td in modo che poi il codice qui sotto faccia le sue magie
4214
+ if (((_b = this.DynamicRowColumnsDefinition) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4215
+ this.logger.log("Generating ths and tds from Dynamic definition");
4216
+ let ret = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4217
+ this.EsThs = ret.ths;
4218
+ this.EsTds = ret.tds;
4219
+ }
4220
+ // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4221
+ if (!this.arrayMode && view.report_columns) {
4222
+ this.logger.log("Generating ths and tds from report results");
4223
+ let ret = this.reportMode_H.generateThsAndTdsFromView(view);
4224
+ this.EsThs = ret.ths;
4225
+ this.EsTds = ret.tds;
4226
+ }
4227
+ // Espando i th e i td multipli duplicandoli
4228
+ let ret = this.columnMetadata_H.expandMultiThsAndTds(this.EsThs, this.EsTds, itemsAndGroups);
4229
+ this.EsThs = ret.expThs;
4230
+ this.EsTds = ret.expTds;
4231
+ // Genero la cache dei th da usare da qui in poi, dopo avergli lasciato fare le sue cose in caso ci siano dei multi o dei report
4232
+ for (let i = 0; i < this.EsThs.length; i++) {
4233
+ let th = this.EsThs[i];
4234
+ this.thsCache[th.th] = th;
4235
+ }
4236
+ this.thsCacheSet = true;
4237
+ // Prepassaggio per tirare fuori tutte le info utili sugli headers in modo da non ricacolarseli sempre dopo
4238
+ let hI = this.columnMetadata_H.evaluateHeadersGroupingInfos(this.EsThs);
4239
+ if (this.arrayMode) // In modalità array non ho un backend...
4240
+ this.rowGrouping_H.arrayModeReviewGroupings(hI.leafs); // ... i raggruppamenti li devo fare lato client
4241
+ this.columnMetadata_H.reviewColumnsList(hI.leafs); // Aggiorna la lista delle colonne da mostrare nella dialog per ordinamento ecc
4242
+ 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.
4243
+ this.columnMetadata_H.moveFixedColumnsAtTheBeginning(hI.leafs, this.EsTds); // 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)
4244
+ this.columnMetadata_H.alignHeadersOrdering(hI.leafs, view); // Allineo gli ordinamenti agli header
4245
+ this.columnMetadata_H.refreshColumnsVisibility(hI.leafs, this.EsTds, view); // Lavoro sui TH ed eventualmente modifico la visibilità anche dei TD.
4246
+ this.columnMetadata_H.evaluatePinnedColumnsWidth(); // Se sono presenti colonne pinnate valuta la dimensione del contenitore
4247
+ this.columnMetadata_H.generateDefaultOrder(hI.leafs, view); // Genero le direttive di ordinamento, che siano default o derivanti dalla AppSearch
4248
+ this.columnMetadata_H.evaluateHeaderGroups(hI); // Valuto i raggruppamenti degli header se presenti
4249
+ // ************************************* Generazione binding per righe e colonne *************************************
4250
+ this.evaluateRowThs(hI.leafs); // Raccolgo i TH
4251
+ this.evaluateRowTds(hI.leafs, this.EsTds); // Raccolgo i TD in contesti separati, un contesto per ogni item o gruppo
4252
+ // ************************************* Ultimi aggiustmaenti dei binding *************************************
4253
+ this.columnMetadata_H.applyOrdering(view, true); // Applico l'ordinamento sulle colonne (non ASC DESC, ma "prima questa o quella colonna")
4254
+ this.MoveTemporaryVariablesToRealOnes(); // Collego TH e TD aggiustati fino ad ora alle variabili di Binding HTML
4255
+ this.selection_H.evaluateSelection(itemsAndGroups, si); // Riallineo le info di selezione degli elementi della View
4256
+ // Valuta lo stato iniziale di selezione a range
4257
+ this.selection_H.evaluateSingleCellSelection(itemsAndGroups, hI.leafs, this.DynamicRowColumnsDefinition);
4258
+ if (this.ResearchNeeded) {
4259
+ this.changed();
4260
+ this.emitSearchRequest(false);
4261
+ this.ResearchNeeded = false;
4262
+ }
4220
4263
  }
4221
- this.thsCacheSet = true;
4222
- // Prepassaggio per tirare fuori tutte le info utili sugli headers in modo da non ricacolarseli sempre dopo
4223
- let hI = this.columnMetadata_H.evaluateHeadersGroupingInfos(this.EsThs);
4224
- if (this.arrayMode) // In modalità array non ho un backend...
4225
- this.rowGrouping_H.arrayModeReviewGroupings(hI.leafs); // ... i raggruppamenti li devo fare lato client
4226
- this.columnMetadata_H.reviewColumnsList(hI.leafs); // Aggiorna la lista delle colonne da mostrare nella dialog per ordinamento ecc
4227
- 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.
4228
- this.columnMetadata_H.moveFixedColumnsAtTheBeginning(hI.leafs, this.EsTds); // 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)
4229
- this.columnMetadata_H.alignHeadersOrdering(hI.leafs, view); // Allineo gli ordinamenti agli header
4230
- this.columnMetadata_H.refreshColumnsVisibility(hI.leafs, this.EsTds, view); // Lavoro sui TH ed eventualmente modifico la visibilità anche dei TD.
4231
- this.columnMetadata_H.evaluatePinnedColumnsWidth(); // Se sono presenti colonne pinnate valuta la dimensione del contenitore
4232
- this.columnMetadata_H.generateDefaultOrder(hI.leafs, view); // Genero le direttive di ordinamento, che siano default o derivanti dalla AppSearch
4233
- this.columnMetadata_H.evaluateHeaderGroups(hI); // Valuto i raggruppamenti degli header se presenti
4234
- // ************************************* Generazione binding per righe e colonne *************************************
4235
- this.evaluateRowThs(hI.leafs); // Raccolgo i TH
4236
- this.evaluateRowTds(hI.leafs, this.EsTds); // Raccolgo i TD in contesti separati, un contesto per ogni item o gruppo
4237
- // ************************************* Ultimi aggiustmaenti dei binding *************************************
4238
- this.columnMetadata_H.applyOrdering(view, true); // Applico l'ordinamento sulle colonne (non ASC DESC, ma "prima questa o quella colonna")
4239
- this.MoveTemporaryVariablesToRealOnes(); // Collego TH e TD aggiustati fino ad ora alle variabili di Binding HTML
4240
- this.selection_H.evaluateSelection(itemsAndGroups, si); // Riallineo le info di selezione degli elementi della View
4241
- // Valuta lo stato iniziale di selezione a range
4242
- this.selection_H.evaluateSingleCellSelection(itemsAndGroups, hI.leafs, this.DynamicRowColumnsDefinition);
4243
- if (this.ResearchNeeded) {
4244
- this.changed();
4245
- this.emitSearchRequest(false);
4246
- this.ResearchNeeded = false;
4264
+ else if ((this.viewMode || this.arrayMode) && !this.UseCustomCells) {
4265
+ // Riallineo le info di selezione degli elementi della View
4266
+ let items = this.viewMode ? View.items : View;
4267
+ let si = this.viewMode ? View.selection : this.arraymodeSelection;
4268
+ this.selection_H.evaluateSelection(items, si);
4247
4269
  }
4248
- }
4249
- else if ((this.viewMode || this.arrayMode) && !this.UseCustomCells) {
4250
- // Riallineo le info di selezione degli elementi della View
4251
- let items = this.viewMode ? View.items : View;
4252
- let si = this.viewMode ? View.selection : this.arraymodeSelection;
4253
- this.selection_H.evaluateSelection(items, si);
4254
- }
4255
- // Per essere sicuro che dopo un bind di oggetti la es-table aggiorni la grafica
4256
- this.cdr.markForCheck();
4257
- this.FirstBind = false;
4270
+ // Per essere sicuro che dopo un bind di oggetti la es-table aggiorni la grafica
4271
+ this.cdr.markForCheck();
4272
+ this.FirstBind = false;
4273
+ });
4258
4274
  }
4259
4275
  /**
4260
4276
  * Effettua il binding degli oggetti pervenuti da questa chiamata con gli oggetti effettivamente da graficare