File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
projects/igniteui-angular/src/lib/grids/hierarchical-grid
src/app/hierarchical-grid Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -407,11 +407,12 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
407407 ngAfterContentInit ( ) {
408408 this . updateColumnList ( false ) ;
409409 this . childLayoutKeys = this . parent ?
410- this . parentIsland . children . map ( ( item ) => item . key ) :
411- this . childLayoutKeys = this . childLayoutList . map ( ( item ) => item . key ) ;
410+ this . parentIsland . children . map ( ( item ) => item . key ) :
411+ this . childLayoutKeys = this . childLayoutList . map ( ( item ) => item . key ) ;
412412 this . childLayoutList . notifyOnChanges ( ) ;
413- this . childLayoutList . changes . pipe ( takeUntil ( this . destroy$ ) )
414- . subscribe ( ( ) => this . onRowIslandChange ( ) ) ;
413+ this . childLayoutList . changes . pipe ( takeUntil ( this . destroy$ ) ) . subscribe ( ( ) =>
414+ this . onRowIslandChange ( )
415+ ) ;
415416 super . ngAfterContentInit ( ) ;
416417 }
417418
Original file line number Diff line number Diff line change 1- import { Component , ViewChild } from '@angular/core' ;
1+ import { Component , ViewChild , ChangeDetectorRef } from '@angular/core' ;
22import {
33 IgxRowIslandComponent ,
44 IgxHierarchicalGridComponent ,
@@ -30,7 +30,7 @@ export class HierarchicalGridSampleComponent {
3030 @ViewChild ( 'hGrid' , { static : true } )
3131 hGrid : IgxHierarchicalGridComponent ;
3232
33- constructor ( ) {
33+ constructor ( private cdr : ChangeDetectorRef ) {
3434 // this.localData.push({ ID: -1, Name: ''});
3535 // for (let i = 0; i < 10000; i++) {
3636 // const prods = [];
@@ -54,6 +54,10 @@ export class HierarchicalGridSampleComponent {
5454 this . localData [ 2 ] . childData [ 1 ] . hasChild = false ;
5555 }
5656
57+ ngAfterViewInit ( ) {
58+ this . cdr . detectChanges ( ) ;
59+ }
60+
5761 generateData ( count : number , level : number ) {
5862 const prods = [ ] ;
5963 const currLevel = level ;
You can’t perform that action at this time.
0 commit comments