How it works
1. State in the URL – Sort, filters, pagination, and column visibility are stored in the URL (via Nuqs). The client reads these and calls your data layer with the same parameters. 2. getTableActions(tableType) – You ret...
Guide
Using Server Actions for list, create, update, delete and bulk operations
1. State in the URL – Sort, filters, pagination, and column visibility are stored in the URL (via Nuqs). The client reads these and calls your data layer with the same parameters. 2. getTableActions(tableType) – You ret...
1. Server module (optional but recommended) Keep your data logic in a server-only module (e.g. lib/products-server.ts): listing with filter/sort/paginate, create, update, delete, and bulk operations. This file must only...
The list action receives a single object with: | Key | Type | Description | |-----|------|-------------| | page | number | 1-based page index. |
What this page covers
The original MDX source has been condensed into CMS-native cards so the page can be edited and republished from the control plane.
1. State in the URL – Sort, filters, pagination, and column visibility are stored in the URL (via Nuqs). The client reads these and calls your data layer with the same parameters. 2. getTableActions(tableType) – You ret...
1. Server module (optional but recommended) Keep your data logic in a server-only module (e.g. lib/products-server.ts): listing with filter/sort/paginate, create, update, delete, and bulk operations. This file must only...
The list action receives a single object with: | Key | Type | Description | |-----|------|-------------| | page | number | 1-based page index. |
YaYaw Table always runs filtering, pagination, and sorting in server-side mode. No manual flags are required in table config. Your list action should handle search, filters, advancedFilters, orderBy, page, and limit.
The /example route currently runs in local mode, so edits persist locally without a backend: it uses app/[locale]/example/lib/products-local-actions.ts with browser localStorage persistence. Server Action reference file...
Implementation notes
Sort, filters, pagination and column state in the URL with Nuqs
$ const productsStore = [...initialProducts];
$ export async function listProducts(params: {
$ page?: number;
$ limit?: number;
$ filters?: Record<string, unknown>;