Design System
Components

Selectable Data Table

DataTable plus row selection — a leading checkbox column and a live selected-count line.

Everything about sorting, loading, error, and the phone card fallback is inherited unchanged from DataTable — this only adds the checkbox column, the select-all header (indeterminate when some but not all rows are checked), and a live "N selected" line above the table.

None selected
  • __select
    RouteFirst Passage to the West
    Days2
    ServiceGoldLeaf
  • __select
    RouteJourney through the Clouds
    Days2
    ServiceSilverLeaf
  • __select
    RouteRainforest to Gold Rush
    Days2
    ServiceGoldLeaf

Props

Prop

Type

Accessibility

  • Selection is keyed by getRowId, not array index — pass it whenever the table can re-sort or refetch, so a checked row stays checked as the same row, not whatever row happens to land at that index next.
  • Provide getRowLabel so each row's checkbox gets a real accessible name (e.g. "Select First Passage to the West") instead of a generic "Select row" repeated for every checkbox.

Do / Don't

  • Do read selected rows from onSelectionChange's originals, not from re-deriving them off rowSelection state yourself — the callback already gives you the selected row objects.
  • Don't reach for this when nothing on the page acts on a selection (bulk delete, bulk export, etc.) — a checkbox column with no action behind it is a UI promise the screen doesn't keep. Use plain DataTable.

On this page