ant-design/ant-design
View on GitHubWhat to display Table.EXPAND_COLUMN in children column?
Open
#48651 opened on Apr 26, 2024
Inactivehelp wanted💡 Feature Request
Description
Reproduction link
https://ant.design/components/table#expandable
Steps to reproduce
This sample is not working, it displays expandIconColumnIndex=0 and creates an empty column in the desired position:
const columns = [
// here display expand column
{
title: 'ID',
dataIndex: 'id',
key: 'id',
},
{
title: 'Created_at',
dataIndex: 'created_at',
key: 'created_at',
},
{
title: 'Publication',
children: [
{
title: 'Title',
dataIndex: 'title',
key: 'title',
},
{
title: 'Author',
dataIndex: 'author',
key: 'author',
},
Table.EXPAND_COLUMN, // here display empty column
],
},
{
title: 'Note',
dataIndex: 'note',
key: 'note',
},
]
What is expected?
Displays expand column in children column "Publication" Columns -> 'Publication' -> EXPAND_COLUMN
What is actually happening?
Displays 2 column, first column of index 0 default expand column, second column of index 4 empty
| Environment | Info |
|---|---|
| antd | 5.16.4 |
| React | React 18.2.0 |
| System | Windows 11 |
| Browser | Google Chrome |