Tables freezing once interacted with
Hi
I’m having an issue with tanstack tables, being freezing of the whole React application/browser after having a row selected, attempts to sorted, writing in search bar for filtering or navigating pages. Any ideas?
Thanks
15 Replies
quickest-silver•3y ago
Did you check rerenders?
fair-rose•3y ago
same issue
can someone help please
wdym?
fair-rose•3y ago
Data Table
Powerful table and datagrids built using TanStack Table.
fair-rose•3y ago
i followed this
fair-rose•3y ago
created an issue here too https://github.com/shadcn-ui/ui/issues/1960
GitHub
Data table row selection, totally breaks when selecting a row · Iss...
I followed the component example and it freezes the entire page once i click on one of the select icons. const table = useReactTable({ data: dataWithToken, columns: columns, onSortingChange: setSor...
wise-white•3y ago
I don't see where you data is defined, but this is almost certainly an infinite loop caused by not giving your data a stable reference
fair-rose•3y ago
by data is a state
the table is inside a component where i send the state value which is the data
but that states doesn't change
what should i do?
could it be caused by this map
.
constant-blue•3y ago
You need to memoize that
fair-rose•3y ago
how?
i mean where
?
constant-blue•3y ago
useMemo , inline
fair-rose•3y ago
at the data with token or at columns?¿
constant-blue•3y ago
ask chatgpt how to memoize data with useMemo
fair-rose•3y ago
but i mean what imemonize
the original data or the columns
constant-blue•3y ago
dataWithToken
fair-rose•3y ago
ty bro
❤️