rubber-blueR
Refine11mo ago
13 replies
rubber-blue

Why does client-side sorting only sort the data on the current page?

my current code regarding the issue:

const table = useTable({
    columns,
    manualSorting: requestConfig.pagination?.mode === "server",
    getSortedRowModel: getSortedRowModel(),
    getPaginationRowModel: getPaginationRowModel(),
    getCoreRowModel: getCoreRowModel(),
    initialState: {
      pagination: {
        pageSize: 50,
        pageIndex: 0,
      },
      sorting: defaultSort,
      globalFilter: defaultFilters,
    },
    refineCoreProps: {
      pagination: {
        mode: requestConfig?.pagination?.mode || "server",
      },
      sorters: {
        mode: requestConfig.pagination?.mode === "client" ? "off" : "server",
      },
    },
    enableGlobalFilter: true,
  });
Was this page helpful?