AdaptTable for MUI

Live updates in MUI

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 MUI.

The feed is the host's chrome; a patched budget is a MUI TableCell that re-renders with the new number, inside the same TableRow that was already there.

The code

import { DataTable } from "@adapttable/mui";
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/mui @adapttable/core @mui/material

The same feature in the other kits

More MUI features

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