@esfaenza/es-table 11.2.150 → 11.2.151

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