From 3dc64d01dbc2c39dfc6c14ba5d9ab3057e00905f Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Sat, 9 May 2026 10:56:39 +0700 Subject: [PATCH] chore: update server-side sorting pattern context --- CLAUDE.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 06bbd33d..d8f15df6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -192,12 +192,14 @@ Data tables use TanStack Table's `SortingState` wired to `useTableFilter` so tha 4. **SWR key** — SWR uses `getTableFilterToQueryString()` as its key, so any filter change (including sort) automatically re-fetches with the new query params. TanStack Table's built-in client sorting is effectively disabled; the server does the sorting. -**Pass `sorting` / `setSorting` to ``:** +**Pass `sorting`, `setSorting`, and `manualSorting` to `
`:** ```tsx -
+
``` +`manualSorting={true}` is required — without it TanStack Table still applies its own client-side sort pass on top of the server-sorted data, producing incorrect order. + **Reference implementation:** `MarketingTable` in [src/components/pages/marketing/MarketingTable.tsx](src/components/pages/marketing/MarketingTable.tsx). ## Server-side file export pattern