View as Markdown

API reference: @salmonui/data-grid/engine

AggregatesMethodstype

import type { AggregatesMethods } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid/engine/aggregates.

type AggregatesMethods<Row> = {
    getFooter(ctx: ModuleContext<Row>): AggregateValues;
    format(ctx: ModuleContext<Row>, columnId: ColumnId, type: AggregateType, value: unknown): string;
};
AggregatesMethods members (2)
NameSignatureDescription
getFootergetFooter(ctx: ModuleContext<Row>): AggregateValues;

Footer (grid-level) aggregate values: server totals when the source performed aggregation, else computed.

formatformat(ctx: ModuleContext<Row>, columnId: ColumnId, type: AggregateType, value: unknown): string;

Formats an aggregate value with the descriptor's format, else the column format.