Skip to content

AggregationRowConfig

Configuration for an aggregation row (footer/header row with computed values). Replaces the core FooterRowConfig functionality.

PropertyTypeDescription
id?stringOptional identifier (useful for diffing or targeted updates)
position?top | bottomPosition: ‘top’ renders above grid body, ‘bottom’ renders below (default: ‘bottom’)
fullWidth?booleanIf true, row rendered as single spanning cell with label
label?string | (rows: unknown[], columns: ColumnConfig<any>[]) => stringLabel for fullWidth mode. Can be a static string or a function that receives the current rows and columns for dynamic content.
cells?Record<string, unknown>Static or computed cell values keyed by field
aggregators?Record<string, AggregatorDefinition>Per-field aggregator configuration. Can be a simple string (‘sum’, ‘avg’, etc.), a function, or an object with aggFunc and formatter.
{ fullWidth: true, label: 'Totals' }
{ fullWidth: true, label: (rows) => `Total: ${rows.length} rows` }

aggregators: {
quantity: 'sum', // simple built-in
price: { aggFunc: 'sum', formatter: (v) => `$${v.toFixed(2)}` } // with formatter
}

AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt