@trudb/tru-common-lib 0.0.413 → 0.0.415

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.
@@ -2218,17 +2218,21 @@ class TruDataGrid {
2218
2218
  }
2219
2219
  ngOnInit() {
2220
2220
  this.subscribeTo();
2221
+ this.columnDefs = this.config.resultConfig.columnDefs;
2222
+ this.gridType = this.config.resultConfig.gridType;
2221
2223
  }
2222
2224
  ngOnChanges(changes) {
2223
2225
  if (this.gridType === TruDataGridTypes.Detail || this.gridType === TruDataGridTypes.DetailManyToMany)
2224
2226
  this.onSearch(this.config.resultConfig.setupQuery(this.entity));
2225
2227
  }
2226
2228
  ngAfterViewInit() {
2227
- this.columnDefs = this.config.resultConfig.columnDefs;
2228
- this.gridType = this.config.resultConfig.gridType;
2229
- this.parentToolbarTemplate = this.searchResultViewManager.searchViewToolbarTemplate;
2230
- if (this.gridType === TruDataGridTypes.Detail || this.gridType === TruDataGridTypes.DetailManyToMany)
2231
- this.onSearch(this.config.resultConfig.setupQuery(this.entity));
2229
+ //setTimeout to prevent: ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError.
2230
+ setTimeout(() => {
2231
+ this.parentToolbarTemplate = this.searchResultViewManager.searchViewToolbarTemplate;
2232
+ if (this.gridType === TruDataGridTypes.Detail || this.gridType === TruDataGridTypes.DetailManyToMany) {
2233
+ this.onSearch(this.config.resultConfig.setupQuery(this.entity));
2234
+ }
2235
+ }, 0);
2232
2236
  }
2233
2237
  }
2234
2238
  TruDataGrid.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGrid, deps: [{ token: TruDataContext }, { token: TruSearchResultViewManager }, { token: TruAppEnvironment }, { token: TruSearchViewEventHandler }, { token: TruUiNotification }], target: i0.ɵɵFactoryTarget.Component });