columns Required | CwColumnDef<T>[] | Column definitions for headers, alignment, sortability, and optional string cell formatters. |
loadData Required | (query: CwTableQuery) => Promise<CwTableResult<T>> | Async row loader. Receives `page`, `pageSize`, `search`, `sort`, `filters`, and `signal`, and should return the matching `rows` plus `total` when known. |
rowKey Required | keyof T & string | Stable unique key used for keyed row rendering and row actions. |
searchable Default: true | boolean | Shows the built-in search input in the toolbar. |
filters Default: {} | Record<string, string[]> | Externally-controlled filters preserved in every request. Use this when your page owns dropdowns, chips, tabs, or other filter controls. |
pageSize Default: 20 | number | Rows per page in pagination mode. In virtual mode, this becomes the batch size requested each time the table fetches more rows. |
pageSizeOptions Default: [10, 20, 50, 100] | number[] | Toolbar choices shown in the rows-per-page or rows-per-batch dropdown. |
groupBy | keyof T & string | ((row: T) => string | number | boolean | null | undefined) | Optional grouping key or callback for the default paginated renderer. The table inserts group headers for each resolved label and ignores this prop in `virtualScroll` mode. |
ungroupedLabel Default: 'Ungrouped' | string | Fallback group header label used when `groupBy` resolves to `null`, `undefined`, or an empty string. |
gridId Default: derived from route | string | Storage key for persisted column visibility. Defaults to the current page path plus `_grid`; pass an explicit value when multiple tables share one route. |
virtualScroll Default: false | boolean | Enables continuous scrolling. The table incrementally loads pages, renders only the visible row window plus overscan, and waits for a real viewport before prefetching more rows. |
virtualScrollHeight Default: '28rem' | string | Viewport height used when `virtualScroll` is enabled without `fillParent`. Choose this when the table should manage its own standalone scroll area. Accepts any CSS size such as `24rem`, `50vh`, or `480px`. |
virtualRowHeight Default: 52 | number | Estimated row height in pixels for virtual windowing. Keep this close to the real rendered row height for the smoothest touch scrolling. |
virtualOverscan Default: 12 | number | Extra rows rendered above and below the viewport. Higher values reduce visible pop-in during fast scrolls and iPad momentum scrolling. |
fillParent Default: false | boolean | Makes the table flex to fill a bounded parent and turns the body region into the scroll container. Best for dashboard cards, split panes, and other flex layouts that already define height. Any shrinking ancestor should also allow it with `min-height: 0`. |
actionsHeader | Snippet | Snippet rendered in the toolbar before the built-in overflow menu. Use this for add, export, filter, or other table-level actions. |
toolbarActions | Snippet | Deprecated alias for `actionsHeader`, kept so existing toolbar content keeps rendering during migration. |
cell | Snippet<[T, CwColumnDef<T>, string]> | Optional custom cell renderer. Useful for badges, durations, links, and richer markup while still falling back to the table’s default string value. |
rowActions | Snippet<[T]> | Optional per-row actions column rendered on the far right. |
rowActionsHeader | string | Optional text label for the row actions column header. If omitted, the header stays blank. |
rowTextSizeKey | string | Optional row property name containing a CSS font-size value when a dataset needs row-level text scaling. |
onSearch / onSort / onPageSizeChanged / onRefresh | callbacks | Optional observers for analytics, syncing external controls, or reacting to table query changes outside the table itself. `onRefresh` fires when the built-in Refresh menu action is selected. |
maxHeight | string | Scrolls rows inside the table so the sticky header works without `fillParent`. |
density Default: 'default' | 'default' | 'compact' | Row padding. |
columnAlign Default: 'center' | 'left' | 'center' | 'right' | Default alignment for every column. |
column.numeric Default: false | boolean | Right-aligns the column, uses tabular figures and formats numbers. |
column.decimals | number | Fraction digits for numeric columns. |
column.truncate Default: false | boolean | Truncates long values with an ellipsis and shows the full value on hover. |