T
TanStack2y ago
extended-salmon

Rows are not updating

Current i have a table that receives updates by a websocket, but my rows are not updating. (I can see the rows updates if i do for example a JSON.stringigy. Any ideas ?
{table.getRowModel().rows.map((row, index) => (
<SelectableRow
key={row.id}
$isInterleaved={index % 2 === 0 ? true : false}
>
{row.getVisibleCells().map((cell) => {
const { columnDef } = cell.column;
const { align = 'left', cell: columnCell } =
columnDef as ExtendedColumnDef<T>;

return (
<TableDataCell
style={{
width: cell.column.getSize(),
}}
key={cell.id}
$columnAlign={align}
title={
cell.column.id === 'id'
? cell.getValue<string>()
: ''
}
>
{flexRender(columnCell, cell.getContext())}
</TableDataCell>
);
})}
{table.getRowModel().rows.map((row, index) => (
<SelectableRow
key={row.id}
$isInterleaved={index % 2 === 0 ? true : false}
>
{row.getVisibleCells().map((cell) => {
const { columnDef } = cell.column;
const { align = 'left', cell: columnCell } =
columnDef as ExtendedColumnDef<T>;

return (
<TableDataCell
style={{
width: cell.column.getSize(),
}}
key={cell.id}
$columnAlign={align}
title={
cell.column.id === 'id'
? cell.getValue<string>()
: ''
}
>
{flexRender(columnCell, cell.getContext())}
</TableDataCell>
);
})}
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?