Set Table expandable property at row level
See original GitHub issueWhat problem does this feature solve?
Currently the Table “Expandable” property can only be specified at for the entire table. There are use cases where you only want some rows to be expandable.
What does the proposed API look like?
The simplest way would be to not render the expand icon if null
or undefined
is returned via the expandedRowRender
prop.
<Table columns={columns} dataSource={this.props.data} expandedRowRender={(record) =>{
if(record.expandable) {
return <p>hello!</p>;
} else {
return null;
}
}}
/>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Antd expandable table, expand all rows at same time when ...
so I had to set the keys to each column. I added keys to column definition and each column of data source. I...
Read more >Set or change table properties - Microsoft Support
First, click in the row or select the rows you want to change, right-click, choose Table Properties, and then click the Row tab....
Read more >A Table with Expandable and Collapsible Rows Using Angular
In this article, I will walk you through how I created a table in Angular that has expandable and collapsible rows. My motivation...
Read more >Expanding | TanStack Table Docs
Enables manual row expansion. If this is set to true , getExpandedRowModel will not be used to expand rows and you would be...
Read more >How to Build Expandable Tables with Zone Visibility in Tableau
An expandable table takes a standard table and adds visual components between the rows–but only when a particular row is selected. An expandable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For performance reason, we don’t call expandedRowRender until the row is expanded. If you don’t want show expand icon for some rows, you can use
rowClassName
to add a custom className to the row, and hide the expand icon by css.https://codesandbox.io/s/o4l12vnnkq