API reference: @salmonui/data-grid
DataGridGroupCaptionContextinterface
import type { DataGridGroupCaptionContext } from '@salmonui/data-grid';interface DataGridGroupCaptionContext<Row> {
readonly group: GroupRowSnapshot;
readonly field: string;
readonly header: string;
readonly key: GroupRowSnapshot['key'];
readonly value: unknown;
readonly formattedKey: string;
readonly count: number;
readonly expanded: boolean;
readonly aggregates: AggregateValues;
readonly rows: () => readonly Row[];
readonly toggle: () => void;
}
Context of grouping.renderCaption.
| Name | Signature | Description |
|---|---|---|
group | readonly group: GroupRowSnapshot; | |
field | readonly field: string; | |
header | readonly header: string; | |
key | readonly key: GroupRowSnapshot['key']; | JSON key and raw value of the group. |
value | readonly value: unknown; | |
formattedKey | readonly formattedKey: string; | |
count | readonly count: number; | |
expanded | readonly expanded: boolean; | |
aggregates | readonly aggregates: AggregateValues; | |
rows | readonly rows: () => readonly Row[]; | Data rows of the group (computed on call). |
toggle | readonly toggle: () => void; |