DataTable
DATA DISPLAYSortable, filterable data table with pagination. Accepts column definitions and row data.
[EXAMPLES]
Basic Table
DataTable requires TanStack Table column definitions. See code example.
[PROPS]
| PROP | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| columns | ColumnDef[] | — | TanStack Table column definitions |
| data | T[] | — | Row data array |
| searchKey | string | — | Column key for search filtering |
| onRowClick | (row: T) => void | — | Row click callback |
| pageSize | number | 10 | Rows per page |
[ACCESSIBILITY]
KEYBOARD SHORTCUTS
| KEY | ACTION |
|---|---|
| Tab | Navigate between interactive cells |
| Enter | Activate row click |
ARIA
- >Uses semantic <table>, <thead>, <tbody> elements
- >aria-sort on sortable column headers