I have created a Material React table using
<MaterialReactTable columns={columns} data={data} />
.
I want a colspan across two to three columns (example below).
Is it possible with material react table or do i need to use ag-grid? if using ag-grid, what is syntax?
I am expecting the column span should be displayed.
2
Answers
You can achieve as you expected in the picture by using
MaterialTable
package.Here is the customization for
<TableCell colSpan={number} />
in the header section:Expected Result:
NPM Package: https://www.npmjs.com/package/material-table
Package Git Repo: https://github.com/mbrn/material-table
You need to provide a colSpan property to the TableCell component.