Docs Components
DataTableexperimental
The full data experience: filters on top, a sortable table in the middle, pages below. Clicking anywhere in a row opens it — unless you clicked a button or menu inside the row, which act on their own without also opening the row.
API
| Prop | Type | Description |
|---|---|---|
columns required | Column<T>[] | {key, header, cell, sortValue?, numeric?}. sortValue presence makes the column sortable. |
rows / rowKey required | T[] / (row)=>string | Data + stable key. |
onRowOpen | function | Makes rows whole-surface targets with keyboard activation. |
empty required | {title, description?, action?} | Zero-results is a designed state; the action usually clears filters. |
initialSort | {key, direction} | Default ordering. |
Guidelines
- mustPer-row secondary actions live in a DropdownMenu cell that stops propagation from the row target.
- mustInteractive cells (star, menu) stop propagation; the rest of the row opens the entity.
- mustWhole-row open ignores clicks that originate on interactive cell content (buttons, links, inputs, menus, dialogs) — the guard lives in DataTable itself, so cells never need stopPropagation wrappers.