Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The table is re-rendering and displaying in debug mode with ⏱ 0 / 0 ms for getFilteredRowModel. This keeps logging every millisecond. #5866

Open
2 tasks done
GAjay opened this issue Jan 12, 2025 · 1 comment

Comments

@GAjay
Copy link

GAjay commented Jan 12, 2025

TanStack Table version

8.20.6

Framework/Library version

18.3.1

Describe the bug and the steps to reproduce it

With the code mentioned below, I observed that my component is rendering multiple times without any reference or other changes. The rendering is happening continuously.
`const memoizedColumns = React.useMemo(() => UserFields, []);
const memoizedData = React.useMemo(() => {
console.log("refe");
return data;
}, [data]);
const [columnFilters, setColumnFilters] = React.useState(
[]
);

const [sorting, setSorting] = React.useState([]);
const table = useReactTable({
data: memoizedData,
columns: memoizedColumns,
state: {
columnFilters,
sorting,
},
onSortingChange: setSorting,
onColumnFiltersChange: setColumnFilters,
getCoreRowModel: getCoreRowModel(),
getFilteredRowModel: useMemo(() => getFilteredRowModel(), []), //client-side filtering
getSortedRowModel: getSortedRowModel(),
getPaginationRowModel: getPaginationRowModel(),
getFacetedRowModel: getFacetedRowModel(), // client-side faceting
getFacetedUniqueValues: getFacetedUniqueValues(), // generate unique values for select filter/autocomplete
getFacetedMinMaxValues: getFacetedMinMaxValues(),
autoResetPageIndex: false,
autoResetExpanded: false, // generate min/max values for range filter
debugTable: true,
debugCells: true,
// debugHeaders: true,
// debugColumns: false,
});`

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

no

Screenshots or Videos (Optional)

No response

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

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@KevinVandy
Copy link
Member

You probably have an infinite render from an unstable reference somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants