@@ -1685,6 +1685,33 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
16851685
16861686 } ) ;
16871687
1688+ it ( 'should allow changing row islands runtime in nested child grid.' , ( ) => {
1689+ const row = hierarchicalGrid . gridAPI . get_row_by_index ( 0 ) as IgxHierarchicalRowComponent ;
1690+ UIInteractions . simulateClickAndSelectEvent ( row . expander ) ;
1691+ fixture . detectChanges ( ) ;
1692+
1693+ let childGrid = hierarchicalGrid . gridAPI . getChildGrids ( ) [ 0 ] ;
1694+ const childRow = childGrid . gridAPI . get_row_by_index ( 0 ) as IgxHierarchicalRowComponent ;
1695+ UIInteractions . simulateClickAndSelectEvent ( childRow . expander ) ;
1696+ fixture . detectChanges ( ) ;
1697+
1698+ let hGrids = fixture . debugElement . queryAll ( By . css ( 'igx-hierarchical-grid' ) ) ;
1699+ expect ( hGrids . length ) . toBe ( 3 ) ;
1700+ expect ( childGrid . gridAPI . getChildGrids ( ) . length ) . toBe ( 1 ) ;
1701+
1702+ fixture . componentInstance . toggleRINested = true ;
1703+ fixture . detectChanges ( ) ;
1704+
1705+ const nestedChildGrid = childGrid . gridAPI . getChildGrids ( ) [ 0 ] ;
1706+ const nestedChildRow = nestedChildGrid . gridAPI . get_row_by_index ( 0 ) as IgxHierarchicalRowComponent ;
1707+ UIInteractions . simulateClickAndSelectEvent ( nestedChildRow . expander ) ;
1708+ fixture . detectChanges ( ) ;
1709+
1710+ hGrids = fixture . debugElement . queryAll ( By . css ( 'igx-hierarchical-grid' ) ) ;
1711+ expect ( hGrids . length ) . toBe ( 4 ) ;
1712+ expect ( nestedChildGrid . gridAPI . getChildGrids ( ) . length ) . toBe ( 1 ) ;
1713+ } ) ;
1714+
16881715 it ( `Should apply template to both parent and child grids` , ( ) => {
16891716 const customFixture = TestBed . createComponent ( IgxHierarchicalGridCustomRowEditOverlayComponent ) ;
16901717 customFixture . detectChanges ( ) ;
@@ -2146,6 +2173,10 @@ export class IgxHierarchicalGridSizingComponent {
21462173 <igx-row-island key="childData" [autoGenerate]="true">
21472174 @if (toggleChildRI) {
21482175 <igx-row-island key="childData" [autoGenerate]="true">
2176+ @if (toggleRINested) {
2177+ <igx-row-island [key]="'childData'" [autoGenerate]="true">
2178+ </igx-row-island>
2179+ }
21492180 </igx-row-island>
21502181 }
21512182 </igx-row-island>
@@ -2156,6 +2187,7 @@ export class IgxHierarchicalGridSizingComponent {
21562187export class IgxHierarchicalGridToggleRIComponent extends IgxHierarchicalGridTestBaseComponent {
21572188public toggleRI = true ;
21582189public toggleChildRI = true ;
2190+ public toggleRINested = false ;
21592191}
21602192
21612193@Component ( {
0 commit comments