AdaptTable for Radix

Rows in Radix

A row is more than a record. Pin it under the header or to the floor of the scroll box, merge cells that share a team so the name is written once, and add or delete through the 3-dot menu.

rowPinning(), cellSpan() and rowActionsLayout="menu" are what this page turns on. Add and delete are callbacks to the host — the table never owns the data. Movement across flat, grouped and tree rows lives on the dedicated row-reordering page.

The pin actions, the menu and the merged cells are Radix. Independent pinned summary rows — totals that are not data rows — live on the aggregation page.

Pin and delete live in a Radix DropdownMenu, and a Team merge is one Table.Cell with rowSpan. The drag grip lives on the row-reordering page.

The code

import { DataTable } from "@adapttable/radix";
import { cellSpan } from "@adapttable/radix/cell-span";
import { rowPinning } from "@adapttable/radix/row-pinning";

export function People({ rows, columns, setPinned, spanTeam }) {
  return (
    <DataTable
      data={rows}
      columns={columns}
      rowKey={(row) => row.id}
      rowActionsLayout="menu"
      features={[
        rowPinning({ onPinnedRowIdsChange: setPinned }),
        cellSpan(spanTeam),
      ]}
    />
  );
}

Install

pnpm add @adapttable/radix @adapttable/core @radix-ui/themes

The same feature in the other kits

More Radix features

Reference: row-pinning, row-reordering, row-spanning. More of this kit: AdaptTable for Radix, or the live demo.