【发布时间】:2022-01-23 20:09:38
【问题描述】:
我无法做到这一点,我附上了下面的代码,请让我知道这里有什么问题?
在添加 expandedRowKeys 和 onExpand 之前,它正在扩展所有表格行,但在实现它之后,它甚至没有打开一行
<Table
rowkey="id"
size="small"
columns={groupsPackageColumns}
dataSource={roomPackages}
className="taglist-table"
expandable={{
expandedRowRender: (record) => (
<Table
rowKey="id"
columns={nestedTagsColumn}
dataSource={record.tags}
className="ant-table-container"
/>
),
expandedRowKeys: activeExpRow,
onExpand: (expanded, record) => {
const keys = [];
if (expanded) {
keys.push(record.id);
}
setActiveExpRow(keys);
},
}}
/>
【问题讨论】:
标签: javascript html css reactjs antd