GroupingRowsConfig
Configuration options for the row grouping plugin
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
groupOn? | (row: any) => any | Callback to determine group path for a row. Return an array of group keys, a single key, null/false to skip grouping. |
defaultExpanded? | DefaultExpandedValue | Default expanded state for group rows. - true: Expand all groups initially - false: Collapse all groups initially (default) - number: Expand group at this index (0-based) - string: Expand group with this key (composite key format: “parent |
groupRowRenderer? | (params: GroupRowRenderParams) => string | void | HTMLElement | Custom group row renderer - takes full control of group row rendering |
showRowCount? | boolean | Show row count in group headers (default: true) |
indentWidth? | number | Indent width per depth level in pixels (default: 20) |
aggregators? | AggregatorMap | Aggregators for group row cells by field name |
formatLabel? | (value: any, depth: number, key: string) => string | Custom format function for group label |
fullWidth? | boolean | Whether to render group row as full-width spanning cell (default: true) |
animation? | ExpandCollapseAnimation | Animation style for expanding/collapsing groups. - false: No animation - 'slide': Slide animation (default) - 'fade': Fade animation |
accordion? | boolean | Accordion mode - only one group can be expanded at a time. Expanding a group will automatically collapse all other groups at the same depth. |
groupRowHeight? | number | Height of group header rows in pixels. Used by the variable row height system to provide consistent heights for group rows without needing to measure them. |
Property Details
Section titled “Property Details”defaultExpanded
Section titled “defaultExpanded”Default: false
animation
Section titled “animation”Default: 'slide'
accordion
Section titled “accordion”Default: false
groupRowHeight
Section titled “groupRowHeight”Height of group header rows in pixels. Used by the variable row height system to provide consistent heights for group rows without needing to measure them.
If not specified, group rows will be measured from the DOM like data rows. Setting this improves performance by avoiding DOM measurements.
new GroupingRowsPlugin({ groupOn: (row) => [row.department], groupRowHeight: 36, // Group headers are 36px tall})
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