Tables
Table pages combine server data with URL-synced table state.
Core building blocks
- Handler (
<feature>.handler.ts) owns query state and filters. - Page (
<feature>.page.tsx) renders controls, table, and pagination. - Columns (
<feature>.column.ts) define table columns and cell rendering. DataTableandPaginationcome from~/common/ui.useTableState,FiltersPanel, andTableChipFilterare the default table helpers.
Canonical example
src/features/team-members demonstrates:
- Server pagination (
page,limit) viagetTeamMembers. - Client-side filtering for search, status, role, and created date range.
- Column definitions with translated headers.
- Route nesting with a child create page.
Typical flow
- Query data with
useQueryand stable query keys. - Keep sorting/filter/page state in
useTableState. - Derive filtered rows in a memoized selector when filtering is client-side.
- Render table and pagination in page component.
Data-access contract
List handlers should only call typed functions from feature-specific data-access modules; parsing and transport details remain outside feature code.