@@ -39,7 +39,15 @@ const rerenderSelector = state => ({
3939 selecting : state . selectedRows ,
4040} )
4141
42- const BodyHeaderCell = ( { header, table, testPrefix, coloredSortedColumn, index } ) => {
42+ const BodyHeaderCell = ( {
43+ header,
44+ table,
45+ testPrefix,
46+ coloredSortedColumn,
47+ index,
48+ children,
49+ isSubheader,
50+ } ) => {
4351 useTableState ( rerenderSelector )
4452
4553 const { column } = header
@@ -75,7 +83,7 @@ const BodyHeaderCell = ({ header, table, testPrefix, coloredSortedColumn, index
7583 background : "columnHighlight" ,
7684 backgroundOpacity : "0.2" ,
7785 } ) }
78- padding = { [ 1 , 2 ] }
86+ padding = { isSubheader ? [ 0 ] : [ 1 , 2 ] }
7987 { ...headStyles }
8088 column
8189 >
@@ -90,7 +98,12 @@ const BodyHeaderCell = ({ header, table, testPrefix, coloredSortedColumn, index
9098 >
9199 < Sorting sortable = { column . getCanSort ( ) } sorting = { column . getIsSorted ( ) } />
92100 { column . isPlaceholder ? null : (
93- < Label sorting = { column . getIsSorted ( ) } sortable = { column . getCanSort ( ) } >
101+ < Label
102+ as = { column . columnDef . labelAs }
103+ { ...column . columnDef . labelProps }
104+ sorting = { column . getIsSorted ( ) }
105+ sortable = { column . getCanSort ( ) }
106+ >
94107 { flexRender ( column . columnDef . header , header . getContext ( ) ) }
95108 </ Label >
96109 ) }
@@ -99,6 +112,7 @@ const BodyHeaderCell = ({ header, table, testPrefix, coloredSortedColumn, index
99112 </ Flex >
100113 < Info meta = { meta } />
101114 < ResizeHandler header = { header } table = { table } />
115+ { children }
102116 </ Flex >
103117 )
104118}
0 commit comments