AdaptTable for Ant Design

Live updates in Ant Design

Rows patch in as they arrive, the way a websocket would. This page applies one budget change at a time so the movement is followable.

Patches go through the row-patch API rather than replacing the array, so search, filters and sort re-run for the touched rows only — your scroll and selection survive.

The feed lists every patch as it lands. The table is Ant Design.

The feed is the host's chrome; a patched budget re-renders through antd's own Table cell, so the row stays an antd record rather than being swapped for a new one.

The code

import { DataTable } from "@adapttable/antd";
import { applyRowPatches, updateRow } from "@adapttable/core";

export function People({ rows, columns, setRows }) {
  const patchBudget = (id, budget) =>
    setRows(
      applyRowPatches(
        rows,
        [updateRow(id, { budget })],
        (row) => row.id
      )
    );
  return (
    <DataTable
      data={rows}
      columns={columns}
      rowKey={(row) => row.id}
    />
  );
}

Install

pnpm add @adapttable/antd @adapttable/core antd

The same feature in the other kits

More Ant Design features

Reference: realtime, cell-editing. More of this kit: AdaptTable for Ant Design, or the live demo.