expand by column: expandable={false} not working while column is custom format
See original GitHub issueclick the cell with button or badge still can expand the row
settingFormatter(cell, row){
return (
<span>
<Button role='button' className="btn btn-outline-info" onClick={() => this.props.loadOffSideBar(true, ACT_TYPE_EDIT, row.id, row.name, row.text)} ><FontAwesome name='pencil' /></Button>
<Button role='button' className="btn btn-outline-danger ml-3" onClick={() => this.props.deleteEvent(row)} ><FontAwesome name='times' /></Button>
</span>
);
}
statusFormatter(cell, row){
return (
<span>
{row.isPublish ?
<Badge color='success' className="p-2">Published</Badge>:
<Badge color='warning' className="p-2">Draft</Badge>
}
</span>
);
}
<TableHeaderColumn dataField="status" dataAlign="center" expandable={ false } dataFormat={this.statusFormatter}>
Status
</TableHeaderColumn>
<TableHeaderColumn dataField="setting" dataAlign="center" expandable={ false } dataFormat={this.settingFormatter}>
{this.renderCustomHeader()}
</TableHeaderColumn>
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Excel table not formatting new rows appropriately - Super User
To resolve this click on the header of a column then right click and choose "Format Cells" option and set the desired format....
Read more >Table expanded row props #10379 - ant-design/ant ... - GitHub
Some rows are expandable and some are not, expandedRowProps(record).expandable // false; Expanded row fetches record details on open, so closing ...
Read more >Work with a List, Record, or Table structured column (Power ...
A column of complex values, such as tables, lists, records or links, can be expanded to reveal the values contained in the complex...
Read more >Set the table column width constant regardless of the amount ...
You need to set the cell width (either th or td worked, I set both) AND set the table-layout to fixed . For...
Read more >Excel Table Doesn't Expand For New Data - Contextures Blog
This week, while working on a client's Excel project, ... To fix the tables, so they automatically expand to include new rows or...
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
Hi, I just reproduced this error and found out why it’s happening.
In TableRow, on the rowClick method, when it’s attempting to get the cellIndex (Line 16 as of now) if the dataFormat adds another html tag, a div, a span or whatever, when it tries to find the cellIndex is going to return undefined.
One possible solution would be to loop back through the .parentNode of the e.target to get the first td element, and then get the cellIndex of that.
@AllenFang @Fenicio Thank you guys, good job. sorry for looking into it late