TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
25.03k stars 3.07k forks source link

How to add onClick with useState hook in cell. Error re-renders because of getRowModel() #5469

Closed Juanryhn closed 6 months ago

Juanryhn commented 6 months ago

TanStack Table version

v8.15.3

Framework/Library version

v18.2.0

Describe the bug and the steps to reproduce it

I want to add a simple call hook inside cell image

and in my table component I call getRowModel like this image

and it return error re-renders on every I click hook call image

even when I click hook outside table component like this it still return many re-renders image

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

-

Screenshots or Videos (Optional)

here is my useReactTable image

image

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct