T
TanStack3y ago
gradual-turquoise

Access table methods outside

Hi, I have created Table component using tanstack-table. The Table component is uncontrolled as it owns all state it passes to useTable options. I would like to call a toggleAllRowsSelected method that above hook returns outside of my Table component. What is the correct way to achieve that? I can pass a ref to my Table component and assing result from useTable and then call it using the ref, but this feels like a hack.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?