{children && (<>{children(table)}>)}
{table.getHeaderGroups().map((headerGroup) => (
{headerGroup.headers.map((header) => {
return (
{header.isPlaceholder
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
)}
)
})}
))}
{table.getRowModel().rows?.length ? (
table.getRowModel().rows.map((row) => (
onRowClick(e, row)}
>
{row.getVisibleCells().map((cell) => (
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
)}
))}
))
) : (
{t('common.table.noResults')}
)}
)
}