From 88e2a797ea7e0a1e3be699c8781f8bf2d31e0007 Mon Sep 17 00:00:00 2001 From: MartinKamenov Date: Tue, 4 Dec 2018 09:52:39 +0200 Subject: [PATCH] chore(*): Waiting until grid has correct headers after binding. --- .../src/lib/grids/grid-base.component.ts | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts index 5511398c5e9..a7a8b382562 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts @@ -2203,16 +2203,17 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements this.onColumnInit.emit(record.item); }); - diff.forEachRemovedItem((record: IterableChangeRecord) => { - // Recalculate Summaries - this.clearSummaryCache(); - this.calculateGridSizes(); - - // Clear Filtering - this.gridAPI.clear_filter(this.id, record.item.field); - - // Clear Sorting - this.gridAPI.clear_sort(this.id, record.item.field); + requestAnimationFrame(() => { + diff.forEachRemovedItem((record: IterableChangeRecord) => { + // Recalculate Summaries + this.clearSummaryCache(); + this.calculateGridSizes(); + + // Clear Filtering + this.gridAPI.clear_filter(this.id, record.item.field); + // Clear Sorting + this.gridAPI.clear_sort(this.id, record.item.field); + }); }); } this.markForCheck();