TanStackT
TanStack2y ago
12 replies
living-lavender

When I select a row, the whole table rerenders.

I have a table and when I select a row the table gets rerendered. That is not a problem for me until I have to do a api call to get the data for a cell and it keeps calling the api when I select one row

For example this is a column helper
    columnHelper.accessor("website", {
      id: "website",
      cell: (item) => <WebsiteReferenceField id={item.getValue()} />,
      header: () => <span>Website</span>,
    }),


This WesiteRefereceField calls the api to get the value

Can anyone help me how to stop this from rerendering?

Thanks
Was this page helpful?