feature: move TD creation to cells

This commit is contained in:
Sammy Teillet
2023-04-19 17:10:37 +02:00
parent 05c5272c93
commit 71c18e864f
3 changed files with 39 additions and 25 deletions

View File

@ -88,11 +88,12 @@ function Table({ data, columns, viewName, viewIcon }: OwnProps) {
<tbody>
{table.getRowModel().rows.map((row) => (
<tr key={row.id}>
{row.getVisibleCells().map((cell) => (
<td key={cell.id}>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
{row.getVisibleCells().map((cell) => {
return flexRender(
cell.column.columnDef.cell,
cell.getContext(),
);
})}
</tr>
))}
</tbody>