AggregationRowConfig
Configuration for an aggregation row (footer/header row with computed values). Replaces the core FooterRowConfig functionality.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
id? | string | Optional identifier (useful for diffing or targeted updates) |
position? | top | bottom | Position: ‘top’ renders above grid body, ‘bottom’ renders below (default: ‘bottom’) |
fullWidth? | boolean | If true, row rendered as single spanning cell with label |
label? | string | (rows: unknown[], columns: ColumnConfig<any>[]) => string | Label 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. |
Property Details
Section titled “Property Details”{ fullWidth: true, label: 'Totals' }{ fullWidth: true, label: (rows) => `Total: ${rows.length} rows` }aggregators
Section titled “aggregators”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