-
I implemented the reusable pagination component, but when I use the pagination controls, they don't change the segment of the data shown. It always shows all the rows, regardless of the page or rows per page selected. Relevant code: export default function FeedListTable<TData, TValue>({
columns,
data,
}: DataTableProps<TData, TValue>) {
// ...
const table = useReactTable({
data,
columns,
// ...
});
return (
// ...
<DataTablePagination table={table} />
// ...
);
} Should TanStack Table handle limiting the data to the right page size and offset or do I need to do that to the data before I render the table? Filtering seems to be done automatically. I can see |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turns out I was missing passing in |
Beta Was this translation helpful? Give feedback.
Turns out I was missing passing in
getPaginationRowModel: getPaginationRowModel(),
intouseReactTable
. That gets the data to React Table to use in its pagination handlers.