Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a material-ui TableRowColumn span multiple columns

It's like the html colspan attribute. Some rows with different numbers of column than the others.

thanks

like image 219
webp Avatar asked Apr 20 '17 15:04

webp


People also ask

How do you add colSpan to material UI table?

Just use the attribute "colSpan" to the <TableCell> element. This works because as it says at material-ui.com/api/table-cell : "Any other props supplied will be provided to the root element (native element)."

How do you customize a table in material UI?

We can make a table with a collapsible column table with the TableRow component. Inside it, we add our TableCell with the Collapse component inside it. We created a Row component and then TableCell . Inside it, we have the Collapse component that we can click to toggle a table on or off.


1 Answers

Simply add the attribute, like:

<TableRowColumn colSpan={6}> 
like image 170
Broote Avatar answered Sep 20 '22 00:09

Broote