|
|
|
|
|
by quink
2293 days ago
|
|
What I did to merge cells but keep the headers the same was to just suppress rendering via if (isFakeColumn(cell.column.id)) {
return <React.Fragment key={cell.column.id}></React.Fragment>;
}
And then render it with another column: {cell.column.id === "title" ? (
<>
{cell.render("Cell")}
<br />
{row.cells[2].render("Cell")}
<br />
{row.cells[3].render("Cell")}
{" ยท "}
{row.cells[4].render("Cell")}
</>
) : (
cell.render("Cell")
)}
There's probably a way to get at the lot via a string, but by index was quick and easy enough.One thing I do have to complain about is the lack of native TypeScript support - there used to be types in the repo, but they got removed. And `prepareRow(row)` is a bit ugly, but nothing major and it's only a one-time call. |
|