Issue with Real-time Table Data not Rendering
const data = useData() // updating once a second
const table = useReactTable({ data })
const { virtualItems } = useTableVirtualizer({ table })
<div>
{virtualItems.map(virtualRow => {
const row = table.getRowModel().rows[virtualRow.index]
return <div>
{row.getVisibleCells().map(cell => (
<div>{flexRender(cell.getContext())}</div>
))}
</div>
})}
</div>
Even though data is changing once a second, and logs confirm those changes, none of the updates are reflecting in the table view. If I force a re-render in the parent then the most recent data appears. If there are any pointers for live data that would be much appreciated!
Thank you