v0.5.0
·
64 commits
to main
since this release
TanStack Form + TanStack Table across admin CRUD pages
New dependencies
@tanstack/react-formv1.28.3@tanstack/react-tablev8.21.3
New files
| File | Purpose |
|---|---|
src/hooks/use-crud-mutation.ts |
Generic mutation hook — invalidation, toasts, fully typed callbacks |
src/components/ui/data-table.tsx |
DataTable<T> — TanStack Table with sorting, responsive column hiding, CSV export, afterRows slot |
src/components/ui/search-filter.tsx |
Search input + colored filter buttons |
Changes
- TanStack Form with Zod validation replaces manual
useStateforms on all 5 admin CRUD pages - DataTable<T> replaces manual
<Table>rendering — 3-way sort toggle, mobile column hiding, timestamped CSV export - useCrudMutation eliminates repetitive
useMutation+invalidateQueries+ toast boilerplate - SearchFilter replaces repeated search + dropdown filter patterns
- Input extended with optional
labelanderrorprops (backward-compatible)
Refactored pages
products— form, table, mutations, search/filter, CSV exportcustomers— sameorders— edit+delete only, no createpayment-methods— simple CRUDcashier— DataTable withafterRowsfor inline form, edit dialog with useForm
Fixes
useCrudMutationnow correctly invalidates tRPC queries after create (#17)