question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set Table expandable property at row level

See original GitHub issue

What 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:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
yesmeckcommented, Jan 11, 2018

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.

9reactions
ycjcl868commented, Mar 14, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found