@@ -25,10 +25,16 @@ const BodyLine = React.forwardRef<HTMLDivElement, BodyLineProps>((props, ref) =>
2525 const { data, index, className, rowKey, style, extra, getHeight, ...restProps } = props ;
2626 const { record, indent, index : renderIndex } = data ;
2727
28- const { scrollX, flattenColumns, prefixCls, fixColumn, componentWidth } = useContext (
29- TableContext ,
30- [ 'prefixCls' , 'flattenColumns' , 'fixColumn' , 'componentWidth' , 'scrollX' ] ,
31- ) ;
28+ const { scrollX, flattenColumns, prefixCls, fixColumn, componentWidth, classNames, styles } =
29+ useContext ( TableContext , [
30+ 'prefixCls' ,
31+ 'flattenColumns' ,
32+ 'fixColumn' ,
33+ 'componentWidth' ,
34+ 'scrollX' ,
35+ 'classNames' ,
36+ 'styles' ,
37+ ] ) ;
3238 const { getComponent } = useContext ( StaticContext , [ 'getComponent' ] ) ;
3339
3440 const rowInfo = useRowInfo ( record , rowKey , index , indent ) ;
@@ -93,16 +99,18 @@ const BodyLine = React.forwardRef<HTMLDivElement, BodyLineProps>((props, ref) =>
9399 { ...restProps }
94100 data-row-key = { rowKey }
95101 ref = { rowSupportExpand ? null : ref }
96- className = { clsx ( className , `${ prefixCls } -row` , rowProps ?. className , {
102+ className = { clsx ( className , `${ prefixCls } -row` , rowProps ?. className , classNames ?. body ?. row , {
97103 [ expandedClsName ] : indent >= 1 ,
98104 [ `${ prefixCls } -row-extra` ] : extra ,
99105 } ) }
100- style = { { ...rowStyle , ...rowProps ?. style } }
106+ style = { { ...rowStyle , ...rowProps ?. style , ... styles ?. body ?. row } }
101107 >
102108 { flattenColumns . map ( ( column , colIndex ) => {
103109 return (
104110 < VirtualCell
105111 key = { colIndex }
112+ className = { classNames ?. body ?. cell }
113+ style = { styles ?. body ?. cell }
106114 component = { cellComponent }
107115 rowInfo = { rowInfo }
108116 column = { column }
0 commit comments