react-bootstrap-table2
react-bootstrap-table2 copied to clipboard
Colspan & Rowspan

Is this feature requested before? This feature was requested before a year a go. I am unsure if someone found an alternative solution as everyone went off track.
Is your feature request related to a problem? Please describe. In the header of the table, you want to have a parent header. This help describe your table better.
Describe the solution you'd like To have 2 rows in the header where the first row can be used to colSpan and give more details.
Describe alternatives you've considered Having each individual column laid out
Additional context In react-bootstrap-table 1, the feature existed. https://github.com/AllenFang/react-bootstrap-table/issues/960
@AllenFang :P You had promised it
I found a way around to add rowSpan.
example:
columns=[{
dataField: "product",
text: "Product",
attrs: (cell, row, rowIndex, colIndex) => (
row.details === x && { "rowSpan": "0" }
),
style: (cell, row, rowIndex, colIndex) => {
if(row.details !== x)
{
return { display: "none" } //make sure other things are not displayed
}
}
}]