AdaptTable for Radix

Row and column virtualization in Radix

Compose virtualize() and the table renders the rows in view plus a small overscan, whatever the dataset's size. virtualize({ virtualizeColumns: true }) does the same across, for column sets far wider than the window.

The header stays pinned, pinned columns stay put, and the scroll box scrolls — never the page. Sorting, filtering and selection keep working on the whole dataset rather than on what is drawn.

Nothing about the markup changes: it is the same Radix table, with the rows outside the window absent rather than hidden.

Radix's Table.Root brings its own ScrollArea, so the adapter restores overflow on the inner table and hands it the min-width — without that the table shrinks to the viewport and a pinned column has nothing to stick against. Columns virtualize here as well as rows.

The code

import { DataTable } from "@adapttable/radix";
import { virtualize } from "@adapttable/radix/virtualize";

export function Ledger({ rows, columns }) {
  return (
    <DataTable
      data={rows}
      columns={columns}
      rowKey={(row) => row.id}
      features={[virtualize({ virtualizeColumns: true })]}
      maxHeight={600}
      defaultColumnLayout={{ pinned: { name: "start" } }}
    />
  );
}

Install

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

The same feature in the other kits

More Radix features

Reference: virtualization. More of this kit: AdaptTable for Radix, or the live demo.