@@ -1685,6 +1685,33 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
1685
1685
1686
1686
} ) ;
1687
1687
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
+
1688
1715
it ( `Should apply template to both parent and child grids` , ( ) => {
1689
1716
const customFixture = TestBed . createComponent ( IgxHierarchicalGridCustomRowEditOverlayComponent ) ;
1690
1717
customFixture . detectChanges ( ) ;
@@ -2146,6 +2173,10 @@ export class IgxHierarchicalGridSizingComponent {
2146
2173
<igx-row-island key="childData" [autoGenerate]="true">
2147
2174
@if (toggleChildRI) {
2148
2175
<igx-row-island key="childData" [autoGenerate]="true">
2176
+ @if (toggleRINested) {
2177
+ <igx-row-island [key]="'childData'" [autoGenerate]="true">
2178
+ </igx-row-island>
2179
+ }
2149
2180
</igx-row-island>
2150
2181
}
2151
2182
</igx-row-island>
@@ -2156,6 +2187,7 @@ export class IgxHierarchicalGridSizingComponent {
2156
2187
export class IgxHierarchicalGridToggleRIComponent extends IgxHierarchicalGridTestBaseComponent {
2157
2188
public toggleRI = true ;
2158
2189
public toggleChildRI = true ;
2190
+ public toggleRINested = false ;
2159
2191
}
2160
2192
2161
2193
@Component ( {
0 commit comments