Skip to content

Commit 55241b5

Browse files
committed
fix(hgrid): Explicitly invoke detectChanges for the root grid #6860
1 parent ee34f4e commit 55241b5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ private resolver;
143143
this.hGrid.childRow = this;
144144
// handler logic that re-emits hgrid events on the row island
145145
this.setupEventEmitters();
146+
this.hGrid.rootGrid.cdr.detectChanges();
146147
this.layout.onGridCreated.emit({
147148
owner: this.layout,
148149
parentID: this.rowData.rowID,

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,10 +1372,8 @@ export class IgxHGridRemoteOnDemandComponent {
13721372
}
13731373

13741374
gridCreated(event: IGridCreatedEventArgs, rowIsland: IgxRowIslandComponent) {
1375-
setTimeout(() => {
1376-
event.grid.data = this.generateRowIslandData(5);
1377-
event.grid.cdr.detectChanges();
1378-
}, 1000);
1375+
event.grid.data = this.generateRowIslandData(5);
1376+
event.grid.cdr.detectChanges();
13791377
}
13801378
}
13811379

0 commit comments

Comments
 (0)