Table expandedRowClassName not called
See original GitHub issue- [ x ] I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
Create table with expandable
=> expandedRowClassName
.
<Table
dataSource={...}
columns={...}
expandable={{
expandedRowClassName: (record, index, indent) => {
console.log("call expandedRowClassName", record, index, indent);
return "myspecialclassname";
}
}}
/>
What is expected?
expandedRowClassName
should be called and the returned string should be applied as classname of the tr
What is actually happening?
expandedRowClassName
is not called.
Environment | Info |
---|---|
antd | 4.15.1 |
React | 17.0.1 |
System | mac os |
Browser | Chrome 89 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Ant Design Table expanded change CSS class | React
I have created function onExpand of the table. onExpand = (expanded, record) => { alert(expanded); console.log('onExpand', expanded, ...
Read more >Table: Use expandedRowClassName also for tree data #30180
[ x ] I have searched the issues of this repository and believe that this is not a duplicate. What problem does this...
Read more >Table - Ant Design
A table displays rows of data. When To Use. To display a collection of structured data. To sort, search, paginate, filter data. How...
Read more >rc-table - npm
There are 507 other projects in the npm registry using rc-table. ... Function(recode, index, indent):string, get expanded row's className.
Read more >Building a TreeTable Using Ant Design System | by Jennifer Fu
A Table, also called a data grid, is an arrangement of data in rows and ... For a TreeTable, the subtable's column header...
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
Thanks @afc163 for the fast reply.
I think it’s not clear in the documentation that it can only be used for
expandedRowRender
since others likeonExpand
orexpandIconColumnIndex
apply for tree data as well. Also, I do not see the reason, why it should be limited toexpandedRowRender
.If you agree that this should not be limited to
expandedRowRender
I could create a feature request, or, if I have some spare time, try to create a pull request for it.trace #30180