TanStackT
TanStack4y ago
2 replies
hidden-sapphire

Has anyone been successful implementing rowSelection and selected update on a button click?

I have been mirroring the example for row selection found here: https://codesandbox.io/s/github/tanstack/table/tree/main/examples/react/row-selection?from-embed=&file=/src/main.tsx

But unfortunately the selected state does not update on button click, however I am able to select a row and view the data in the row, its just the state is always false even though I can retrieve the data and see the index of the selected row in the rowSelection state.
CodeSandbox
tanstack-table-example-row-selection using @faker-js/faker, @tanstack/react-table, react, react-dom
tanstack-table-example-row-selection - CodeSandbox
Was this page helpful?