Data Table
Records the user sorts, filters, selects and pages through. Built on Table; the headers stay visible at every width, and the table scrolls sideways when it's wider than the screen.
Source
components/data-table.tsx| Status | |||
|---|---|---|---|
| ken@example.com | $316.00 | ||
| abe@example.com | $242.00 | ||
| monserrat@example.com | $837.00 | ||
| silas@example.com | $874.00 | ||
| carmella@example.com | $721.00 | ||
| dana@example.com | $129.00 | ||
| eli@example.com | $455.00 | ||
| farah@example.com | $63.00 | ||
| gus@example.com | $990.00 | ||
| hana@example.com | $310.00 |
Usage
When to use
Use when
Records the user sorts, filters, selects or pages through, in memory. Columns from createDataTableColumnHelper; DataTableColumnHeader makes a column sortable; meta: { align: "end" } for numbers; a caption is required. Requires @tanstack/react-table
Don’t use when
A static list (use Table); server-side sorting or paging of large data (use TanStack's manual modes in your own table)