@@ -70,6 +70,7 @@ const ReactDataTable = <TData,>(props: ReactDataTableProps<TData>) => {
7070 key = { header . id }
7171 onClick = { header . column . getToggleSortingHandler ( ) }
7272 style = { { ...header . column . columnDef . meta ?. headerStyle , ...( header . column . getCanSort ( ) ? { cursor : "pointer" } : { } ) } }
73+ className = { header . column . columnDef . meta ?. headerClassName }
7374 >
7475 { header . isPlaceholder ? null : flexRender ( header . column . columnDef . header , header . getContext ( ) ) }
7576
@@ -182,7 +183,7 @@ const ReactDataTable = <TData,>(props: ReactDataTableProps<TData>) => {
182183 { table . getRowModel ( ) . rows . map ( ( row ) => (
183184 < tr key = { row . id } style = { rowStyle && rowStyle ( row . original ) } >
184185 { row . getVisibleCells ( ) . map ( ( cell ) => (
185- < td key = { cell . id } style = { cell . column . columnDef . meta ?. cellStyle } >
186+ < td key = { cell . id } style = { cell . column . columnDef . meta ?. cellStyle } className = { cell . column . columnDef . meta ?. cellClassName } >
186187 { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) }
187188 </ td >
188189 ) ) }
@@ -195,7 +196,13 @@ const ReactDataTable = <TData,>(props: ReactDataTableProps<TData>) => {
195196 { table . getFooterGroups ( ) . map ( ( footerGroup ) => (
196197 < tr key = { footerGroup . id } >
197198 { footerGroup . headers . map ( ( header ) => (
198- < th key = { header . id } > { header . isPlaceholder ? null : flexRender ( header . column . columnDef . footer , header . getContext ( ) ) } </ th >
199+ < th
200+ key = { header . id }
201+ style = { header . column . columnDef . meta ?. footerStyle }
202+ className = { header . column . columnDef . meta ?. footerClassName }
203+ >
204+ { header . isPlaceholder ? null : flexRender ( header . column . columnDef . footer , header . getContext ( ) ) }
205+ </ th >
199206 ) ) }
200207 </ tr >
201208 ) ) }
0 commit comments