AdaptTable for Mantine

Live updates in Mantine

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

The feed beside the table is the host's chrome; the rows themselves are Mantine table rows, and a patched budget is the same cell with a new value.

The code

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

The same feature in the other kits

More Mantine features

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