Skip to content

GroupingRowsConfig

Configuration options for the row grouping plugin

PropertyTypeDescription
groupOn?(row: any) => anyCallback to determine group path for a row. Return an array of group keys, a single key, null/false to skip grouping.
defaultExpanded?DefaultExpandedValueDefault 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 | HTMLElementCustom group row renderer - takes full control of group row rendering
showRowCount?booleanShow row count in group headers (default: true)
indentWidth?numberIndent width per depth level in pixels (default: 20)
aggregators?AggregatorMapAggregators for group row cells by field name
formatLabel?(value: any, depth: number, key: string) => stringCustom format function for group label
fullWidth?booleanWhether to render group row as full-width spanning cell (default: true)
animation?ExpandCollapseAnimationAnimation style for expanding/collapsing groups. - false: No animation - 'slide': Slide animation (default) - 'fade': Fade animation
accordion?booleanAccordion mode - only one group can be expanded at a time. Expanding a group will automatically collapse all other groups at the same depth.
groupRowHeight?numberHeight 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.

Default: false


Default: 'slide'


Default: false


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