File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ rowKey | string or Function(record):string | 'key' | If rowKey is
335335
336336Name | Type | Default | Description
337337:--- | :--- | :------ | :----------
338+ className | String | | class name of the table cell.
338339key | String | | Key of this column.
339340title | React Node | | Title of this column.
340341dataIndex | String | | Display field of the data record.
Original file line number Diff line number Diff line change 1+ import classNames from 'classnames' ;
12import React , { PureComponent } from 'react' ;
23import PropTypes from 'prop-types' ;
34import get from 'lodash.get' ;
@@ -18,9 +19,15 @@ class TableCell extends PureComponent {
1819 const { column, record } = this . props ;
1920 const cName = column . dataIndex ;
2021 const render = column . render ;
22+ const className = column . className ;
2123 let text = get ( record , cName ) ;
2224 return (
23- < div className = { styles . td } >
25+ < div
26+ className = { classNames (
27+ className ,
28+ styles . td
29+ ) }
30+ >
2431 < div className = { styles . tdContent } >
2532 {
2633 render ? render ( text , record ) : text
You can’t perform that action at this time.
0 commit comments