Jump to a page or a component.
Sortable, row-virtualized table — 5,000 rows here, ~20 in the DOM.
| DELETE | /exports/930 | 500 | 1911 ms |
| DELETE | /exports/10 | 201 | 1911 ms |
| DELETE | /exports/87 | 500 | 1911 ms |
| PUT | /webhooks/786 | 200 | 1910 ms |
| PUT | /webhooks/863 | 404 | 1910 ms |
| PUT | /webhooks/940 | 200 | 1910 ms |
| POST | /tokens/refresh/719 | 200 | 1909 ms |
| POST | /tokens/refresh/796 | 400 | 1909 ms |
| POST | /tokens/refresh/873 | 200 | 1909 ms |
| GET | /invoices/575 | 204 | 1908 ms |
| GET | /invoices/652 | 200 | 1908 ms |
| GET | /invoices/729 | 204 | 1908 ms |
| DELETE | /users/508 | 201 | 1907 ms |
| DELETE | /users/585 | 500 | 1907 ms |
| PUT | /exports/364 | 404 | 1906 ms |
| PUT | /exports/441 | 200 | 1906 ms |
| PUT | /exports/518 | 404 | 1906 ms |
No install — ask an AI agent to copy this component from registry.json, then pnpm add @tanstack/react-table, @tanstack/react-virtual.
import { DataTable, dataTableColumnHelper, DataTableColumn, DataTableFeatures } from "@/components/ui/data-table";height exists. Override with a className like h-full inside a parent that already constrains height.columns and data referentially stable (module constant, state, or a query result). A fresh array per render rebuilds the row model every render.defaultSorting; a header click cycles asc → desc → off. enableSorting: false on a column removes its affordance.${testId}-header-<columnId> per header and ${testId}-row-<rowId> per rendered row from data-testid — only rows in view exist to be found.The props worth knowing. Everything else passes straight through to the underlying element, including className, which is merged last so it always wins.
| Prop | Type | Default | Description |
|---|---|---|---|
| columns | DataTableColumn<Row>[] | — | From dataTableColumnHelper<Row>().columns([...]). `size` is width in px; `minSize` / `maxSize` bound a drag; `enableResizing: false` removes a handle. |
| data | Row[] | — | The rows. Stable reference. |
| getRowId | (row: Row, index: number) => string | row index | Stable id per row — React key, virtual measurement, derived test id. |
| height | number | 400 | Scroll box height in px. |
| rowHeight | number | 36 | Estimated row height in px; rows are measured after mount. |
| defaultSorting | SortingState | — | Initial sort, e.g. [{ id: "ms", desc: true }]. |
| resizable | boolean | true | Show resize handles on every column that allows it. |
| defaultColumnSizing | Record<string, number> | — | Initial widths by column id, over each column's size. |
| onColumnSizingChange | (sizing: Record<string, number>) => void | — | Full widths-by-id map after every drag tick. |
| onRowClick | (row: Row) => void | — | Makes rows clickable; called with the row's original datum. |
| emptyLabel | string | "No rows" | Copy shown in place of rows when data is empty. |