Skip to content

Commit b997422

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Move logic to target only hierarchical grid.
1 parent 6f5e6b9 commit b997422

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,9 +2735,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
27352735
this.columnList.changes
27362736
.pipe(takeUntil(this.destroy$))
27372737
.subscribe((change: QueryList<IgxColumnComponent>) => {
2738-
Promise.resolve().then(() => {
2739-
this.onColumnsChanged(change);
2740-
});
2738+
this.onColumnsChanged(change);
27412739
});
27422740
}
27432741

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,14 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
415415
}
416416

417417
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
418-
this.updateColumnList();
419-
const cols = change.filter(c => c.gridAPI.grid === this);
420-
if (cols.length > 0 || this.autoGenerate) {
421-
this.columnList.reset(cols);
422-
super.onColumnsChanged(this.columnList);
423-
}
418+
Promise.resolve().then(() => {
419+
this.updateColumnList();
420+
const cols = change.filter(c => c.gridAPI.grid === this);
421+
if (cols.length > 0 || this.autoGenerate) {
422+
this.columnList.reset(cols);
423+
super.onColumnsChanged(this.columnList);
424+
}
425+
});
424426
}
425427

426428
private updateColumnList(recalcColSizes = true) {

0 commit comments

Comments
 (0)