How to make material-ui TableRowColumn span multiple columns

It looks like an attribute html colspan. Some rows with different column numbers than others.

thank

+9
source share
2 answers

Just add an attribute, for example:

<TableRowColumn colSpan={6}>
+19
source

Just use the "colSpan" attribute for the element <TableCell>.

Example:

render() {
  return (
    <Table className={classes.table}>
      <TableBody>
        <TableRow>
          <TableCell>Data 1</TableCell>
          <TableCell>Data 2</TableCell>
        </TableRow>
        <TableRow>
          <TableCell colSpan={2}>Data Two Columns</TableCell>
        </TableRow>
      </TableBody>
    </Table>
  );
}
+2
source

Source: https://habr.com/ru/post/1675271/


All Articles