Data table
Sorting, filtering, selection and paging, on the client or the server.
In use
Drag a header edge (or focus it and use the arrow keys) to resize; double-click resets. The button at the end of the header row hides and reorders columns (drag a grip, or focus it and use the arrow keys; p95 starts hidden), Requests sorts descending first, and the layout is stored under storageKey.
| gatewayPublic HTTP entry | Healthy | eu-central | 812,400 | |
| workerBackground jobs | Degraded | eu-central | 154,200 | |
| schedulerCron and timers | Healthy | us-east | 8,600 | |
| authSessions and tokens | Healthy | eu-central | 201,900 | |
| mailerOutbound email | Paused | us-east | 0 | |
| searchFull-text index | Healthy | ap-south | 64,300 | |
| billingInvoices and usage | Failing | eu-central | 12,100 | |
| webhooksDelivery and retries | Healthy | us-east | 31,800 |
Click a row to open it.
Variants
| gatewayPublic HTTP entry | Healthy | eu-central | 812,400 | 42 ms |
| workerBackground jobs | Degraded | eu-central | 154,200 | 118 ms |
| schedulerCron and timers | Healthy | us-east | 8,600 | 9 ms |
| authSessions and tokens | Healthy | eu-central | 201,900 | 31 ms |
| mailerOutbound email | Paused | us-east | 0 | – |
| searchFull-text index | Healthy | ap-south | 64,300 | 87 ms |
| billingInvoices and usage | Failing | eu-central | 12,100 | 410 ms |
| webhooksDelivery and retries | Healthy | us-east | 31,800 | 55 ms |
| gatewayPublic HTTP entry | 42 ms |
| workerBackground jobs | 118 ms |
| schedulerCron and timers | 9 ms |
| authSessions and tokens | 31 ms |
| mailerOutbound email | – |
| searchFull-text index | 87 ms |
| billingInvoices and usage | 410 ms |
| webhooksDelivery and retries | 55 ms |
States
No services yet Services you create appear here with their health and traffic. | ||||
Could not load services. The API timed out after 10 seconds. | ||||
Filtering, loading and error
Type to filter and switch the table state. Selection survives filtering.
| gatewayPublic HTTP entry | Healthy | eu-central | 812,400 | 42 ms | |
| workerBackground jobs | Degraded | eu-central | 154,200 | 118 ms | |
| schedulerCron and timers | Healthy | us-east | 8,600 | 9 ms | |
| authSessions and tokens | Healthy | eu-central | 201,900 | 31 ms | |
| mailerOutbound email | Paused | us-east | 0 | – | |
| searchFull-text index | Healthy | ap-south | 64,300 | 87 ms | |
| billingInvoices and usage | Failing | eu-central | 12,100 | 410 ms | |
| webhooksDelivery and retries | Healthy | us-east | 31,800 | 55 ms |
Selection across filtering
Filtered to us-east with worker (eu-central) and webhooks selected: the header checkbox is mixed and acts on visible rows only.
| schedulerCron and timers | Healthy | us-east | 8,600 | 9 ms | |
| mailerOutbound email | Paused | us-east | 0 | – | |
| webhooksDelivery and retries | Healthy | us-east | 31,800 | 55 ms |
Pages
Three rows per page. Selection survives paging.
| gatewayPublic HTTP entry | Healthy | eu-central | 812,400 | 42 ms | |
| workerBackground jobs | Degraded | eu-central | 154,200 | 118 ms | |
| schedulerCron and timers | Healthy | us-east | 8,600 | 9 ms |
Server data
With manual a fake loader answers after 400 ms; the filter debounces by 200 ms.
Code
import { DataTable, type Column } from "@a31labs/rax/data-table";
const columns: Column<Service>[] = [
{ id: "name", header: "Service", cell: (s) => s.name, subtitle: (s) => s.desc, sortValue: (s) => s.name },
{ id: "req", header: "Requests", cell: (s) => s.req, sortValue: (s) => s.req, numeric: true, firstSort: "desc", hideable: true },
{ id: "p95", header: "p95", cell: (s) => s.p95 == null ? null : `${s.p95} ms`, sortValue: (s) => s.p95, numeric: true, hideable: true, defaultHidden: true },
];
<DataTable label="Services" rows={rows} columns={columns} getRowId={(s) => s.id}
state={isLoading ? "loading" : error ? "error" : "ready"} error="Could not load services." onRetry={refetch}
empty={{ title: "No services yet", action: <Button>New service</Button> }}
selectable selected={selected} onSelectedChange={setSelected}
globalFilter={query} pageSize={25}
resizable reorderable storageKey="services" rowHref={(s) => `/services/${s.id}`} onRowNavigate={(href) => router.push(href)} />
// server data: rows render as given, the table reports sort and page intent
<DataTable label="Services" rows={pageRows} columns={columns} getRowId={(s) => s.id}
manual={{ sort, onSortChange: setSort, page, pageCount, onPageChange: setPage, total }} />