API reference: @salmonui/data-grid
DataGridAggregateContextinterface
import type { DataGridAggregateContext } from '@salmonui/data-grid';interface DataGridAggregateContext<Row> {
readonly field: string;
readonly column: DataGridColumnInfo<Row> | undefined;
readonly values: Readonly<Record<string, unknown>>;
readonly formatted: Readonly<Record<string, string>>;
readonly group: GroupRowSnapshot | null;
readonly key: GroupRowSnapshot['key'] | null;
readonly count: number;
readonly aggregates: AggregateValues;
readonly rows: () => readonly Row[];
}
Context of aggregate templates (renderFooter, renderGroupFooter, renderGroupCaption).
| Name | Signature | Description |
|---|---|---|
field | readonly field: string; | |
column | readonly column: DataGridColumnInfo<Row> | undefined; | |
values | readonly values: Readonly<Record<string, unknown>>; | Values of this column's aggregates by type ( |
formatted | readonly formatted: Readonly<Record<string, string>>; | Formatted values by type. |
group | readonly group: GroupRowSnapshot | null; | The group for group footers and captions; null in the grid footer. |
key | readonly key: GroupRowSnapshot['key'] | null; |
|
count | readonly count: number; | |
aggregates | readonly aggregates: AggregateValues; | Every aggregate of the group or grid. |
rows | readonly rows: () => readonly Row[]; |