Data-Table (WIP)
data-table composition and explicit implementation boundary.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
Data Table composes passive Table topology with stable record IDs, stable sorting, global filtering, pagination and row selection. Rows are authored presentation slots indexed within the current page; cells render their columnKey from the current record, so sort changes update actual content without pretending CSS order changed Table structure. App-owned rows must have unique id values. The composition does not own fetching, editing or column reordering.
WIP functional source. Full runtime/Compiler/native, packaging, browser and visual acceptance remain pending.
Sorting headers belong inside the static DataTableHeaderRow composition. It inherits passive Table Row topology, has no props or instance exposes, and creates no selection, focus or Trigger owner. Body rows remain DataTableRow record slots. The legacy DataTableRow.header prop still changes record-slot policy at runtime; it does not remove that row’s setup-time Trigger identity and cannot contain multiple direct Trigger children. The examples use the new static composition without relaxing Trigger-chain rules.
Data Table is workspace source. There is no public proto-ui add target. Passing sortKey, sortDirection, page, or selectedKeys selects controlled mode for that fact.
| Prop | Type | Default |
|---|---|---|
rows | readonly DataRecord[] | [] |
defaultSortKey | string | '' |
defaultSortDirection | 'none' 'ascending' 'descending' | none |
filter | string | '' |
defaultPage | number | 0 |
pageSize | number | 10 |
defaultSelectedKeys | readonly string[] | [] |
disabled | boolean | false |
readOnly | boolean | false |
These props belong to Root. Row defaults index to 0 and header to false. Cell defaults columnKey to ''. Header defaults sortable to true. Previous and Next accept the Button props.