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 diff --git a/src/components/pages/expense/ExpenseRequestContent.tsx b/src/components/pages/expense/ExpenseRequestContent.tsx index e92ecc82..a0438197 100644 --- a/src/components/pages/expense/ExpenseRequestContent.tsx +++ b/src/components/pages/expense/ExpenseRequestContent.tsx @@ -548,21 +548,15 @@ const ExpenseRequestContent = ({