T
TanStack3y ago
optimistic-gold

Can someone explain why getSortedRowModel() is firing over and over again?

I have a table with data on it in my electron app, but for some reason as soon as I add getSortedRowModel to my useReactTable, my console shows that the table is firing getSortedRowModel() over and over again, making it impossible to actually do anything and causing a memory leak. my useReactTable():
const table = useReactTable({
data: filteredPieces,
columns,
state: {
rowSelection,
sorting: [
{
id: 'updatedAt',
desc: true,
},
{
id: 'main',
desc: false,
},
{
id: 'yearPublished',
desc: false,
},
],
},
getCoreRowModel: getCoreRowModel(),
onRowSelectionChange: setRowSelection,
sortDescFirst: true,
// getSortedRowModel: getSortedRowModel(),
debugTable: true,
});
const table = useReactTable({
data: filteredPieces,
columns,
state: {
rowSelection,
sorting: [
{
id: 'updatedAt',
desc: true,
},
{
id: 'main',
desc: false,
},
{
id: 'yearPublished',
desc: false,
},
],
},
getCoreRowModel: getCoreRowModel(),
onRowSelectionChange: setRowSelection,
sortDescFirst: true,
// getSortedRowModel: getSortedRowModel(),
debugTable: true,
});
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?