fix: table customRender set class and style not work #2004

pull/2016/head
tangjinzhou 2020-04-02 22:09:26 +08:00
parent 0b7481e8ab
commit 34ab34a135
1 changed files with 3 additions and 1 deletions

View File

@ -70,6 +70,8 @@ export default {
if (isInvalidRenderCellText(text)) {
tdProps.attrs = text.attrs || {};
tdProps.props = text.props || {};
tdProps.class = text.class;
tdProps.style = text.style;
colSpan = tdProps.attrs.colSpan;
rowSpan = tdProps.attrs.rowSpan;
text = text.children;
@ -99,7 +101,7 @@ export default {
tdProps.style = { textAlign: column.align, ...tdProps.style };
}
const cellClassName = classNames(className || column.class, {
const cellClassName = classNames(className, column.class, {
[`${prefixCls}-cell-ellipsis`]: !!column.ellipsis,
//
// https://github.com/ant-design/ant-design/issues/13825#issuecomment-449889241