KB-310 · DATATABLE/GROUPED/ROLLUP
Grouped Rollup Table
A grid that adds up: rows grouped by site, every group carrying its own subtotal, and a grand total that is the sum of what is shown rather than a number typed in beside it. Folding a group keeps its subtotal visible, because the reason to fold is to compare groups.
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/datatable-grouped-rollup
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| groups | RollupGroup[] | — | Each group and its rows; every total is derived. |
| defaultOpen | string[] | — | Groups open on load; omit to open all. |