react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Colspan & Rowspan

Open Mikeez opened this issue 5 years ago • 2 comments

image

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

Mikeez avatar Aug 11 '20 20:08 Mikeez

@AllenFang :P You had promised it

Mikeez avatar Aug 31 '20 16:08 Mikeez

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
   }
}
}]

sumanthExp avatar Feb 17 '22 21:02 sumanthExp