File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
projects/igniteui-angular/src/lib/grids/hierarchical-grid Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -667,6 +667,18 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
667667 ) ;
668668 jasmine . getEnv ( ) . allowRespy ( false ) ;
669669 } ) ;
670+
671+ it ( 'should calculate correct column headers width when rowSelection + expand indicators' , ( ) => {
672+ hierarchicalGrid . rowSelection = 'multiple' ;
673+ fixture . detectChanges ( ) ;
674+
675+ const headerRowElement = hierarchicalGrid . nativeElement . querySelector ( "igx-grid-header-row" ) ;
676+ const headerRowDiv = headerRowElement . querySelector ( ".igx-grid__tr" ) ;
677+ const headerRowChildren = Array . from ( headerRowDiv . children ) ;
678+
679+ const elementsWidth = headerRowChildren . reduce ( ( acc , el ) => acc + ( el as HTMLElement ) . offsetWidth , 0 ) ;
680+ expect ( elementsWidth ) . toEqual ( ( headerRowDiv as HTMLElement ) . offsetWidth ) ;
681+ } ) ;
670682 } ) ;
671683
672684 describe ( 'IgxHierarchicalGrid Row Islands #hGrid' , ( ) => {
@@ -1689,7 +1701,7 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
16891701 UIInteractions . simulateClickAndSelectEvent ( row . expander ) ;
16901702 fixture . detectChanges ( ) ;
16911703
1692- let childGrid = hierarchicalGrid . gridAPI . getChildGrids ( ) [ 0 ] ;
1704+ const childGrid = hierarchicalGrid . gridAPI . getChildGrids ( ) [ 0 ] ;
16931705 const childRow = childGrid . gridAPI . get_row_by_index ( 0 ) as IgxHierarchicalRowComponent ;
16941706 UIInteractions . simulateClickAndSelectEvent ( childRow . expander ) ;
16951707 fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments