【发布时间】:2020-07-31 18:26:44
【问题描述】:
{
title: 'Home phone',
colSpan: 2,
dataIndex: 'tel',
render: (value, row, index) => {
const obj = {
children: value,
props: {},
};
if (index === 2) {
obj.props.rowSpan = 2;
}
// These two are merged into above cell
if (index === 3) {
obj.props.rowSpan = 0;
}
if (index === 4) {
obj.props.colSpan = 0;
}
return obj;
},
},
在基于索引值rowspan大小的dis示例中,我们可以根据以前的列数据来做吗(如果有两个John Brown,那么行跨度应该是2)?所以基本上我们需要通过对行进行排序和比较行值来确定行跨度大小。
【问题讨论】:
-
您可以将选项作为函数返回,并将数据作为参数传递给您自定义的合并条件
-
你能详细说明一下吗?没有得到你..
-
你有没有找到解决这个问题的方法? @Hemanthvrm
-
对不起,我没有...
标签: reactjs html-table antd