Docs Platform

DataTable

A table of rows the machine treats as opaque. It owns the sort order and nests the generic selection machine inside itself. You render the cells, and the machine never sees what is in them.

Live machine

The shipped dataTableMachine, default-sorted on p95. Toggling a sortable key cycles asc/desc; the unsortable status column is inert by contract.

data-table · live via createService

billing-worker88healthy
ledger-api142healthy
analytics-ingest310degraded

States · walked from the machine

active

Transitions from here · click to send

Context

{
  "sortKey": "p95",
  "dir": "asc",
  "selection": {
    "value": "ready",
    "context": {
      "mode": "uncontrolled",
      "selectedIds": [],
      "anchorId": null
    }
  }
}

Log · newest first

No events yet — use the component above or send a transition.

Explore the layers

Machine (@grassroot/ui-machines/data-table plus @grassroot/ui-machines/selection). Headless: five adapters plus mountDataTable. Spec: packages/ui-headless/core/src/data-table/data-table.spec.md.

Behaviour contract

Sort toggles on header activation. Selection modes are none | single | multiple. Unknown IDs are same-reference no-ops.

Selection reuse

Nested selectionMachine. Do not fork a table-specific selection machine. ChartShell also imports this selection package.