When your server sorts or groups the rows, the plugin sets the table's sorting or grouping state and your code fetches the rows that match. Filtering stays in the browser.
| Table option | What the plugin does | What your code does |
|---|---|---|
manualSorting: true | Sets sorting on sortable columns. No sortedRowModel or assistantSort needed. | Fetches the rows in that order, across all pages. |
manualGrouping: true | Sets grouping on groupable columns. No assistantGroupedRowModel() needed. | Fetches and shows the groups. |
manualFiltering: true | Tells Gridsay filtering is off; a filter question is declined. | Keeps its own filter controls. |
manualPagination: true | Nothing: an answer never changes the page. | Owns the page and the fetching. |
These are TanStack Table's own options.
Keep the sorting state in your component, pass it to your fetch, and give the same state to the table:
const [sorting, setSorting] = useState<SortingState>([]);const rows = useRows({ sorting });const table = useTable({ features, // tableFeatures({ rowSortingFeature }); no sortedRowModel required columns, data: rows, manualSorting: true, state: { sorting }, onSortingChange: setSorting,});const assistant = useTableAssistant(table, { url: '/api/tanstack-table' });useRows stands for your own data hook, keyed by the sorting state. Ask newest first: the plugin sets the sorting, and your fetch returns the rows in that order.
ask resolves true, the state has changed; the new rows may still be loading.The plugin's filters run in the browser. It does not turn them into a query for your server, so with manualFiltering it tells Gridsay filtering is off and a filter question is declined. A declined question is charged.
Do not pass the plugin's filter values to SQL, a search API or your access rules.
With manualGrouping, an answer such as "group by status" sets the grouping state to the list of column ids, in order. Your server forms the groups and your table renders them. Manual grouping does not make totals, pivots or charts available.
autoResetPageIndex setting; with manualPagination, reset the page yourself if you need to.Undo puts back the sorting or grouping state the last answer changed, then the page and the open groups. Your fetch must follow the restored state too: undo does not keep earlier pages of data. See Undo and reset.