Skip to content
Discussion options

You must be logged in to vote
  1. Make sure imports are proper-
    import { flexRender, getCoreRowModel, useReactTable, getPaginationRowModel} from "@tanstack/react-table";

  2. Try custom settings for pagination
    const [pagination, setPagination] = useState({
    pageIndex: 0,
    pageSize: 10,
    pageCount: Math.ceil(final,Data.length / 10),
    })

  3. Dont forget these --
    const table = useReactTable({
    data,
    columns,
    state: { pagination },
    onPaginationChange: setPagination,
    getCoreRowModel: getCoreRowModel(),
    getPaginationRowModel: getPaginationRowModel(),
    debugTable: true,
    });

  4. My Issue that forced me to create this discussion--

    In my code of table body, while rendering table data we use the below line--

    {table.getRowModel().rows.map(row =…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShubhanshSharma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant