Interface RowGroupIf<T>

A group of a row grouping – the data of a group row in an AreaModelRowGroups and the result of groupRows. Groups of the last level hold the rows; groups above hold sub-groups.

Example

// the group of a clicked row
const group = model.getRowGroup(rowIndex);
if (group) console.log(group.path, group.count, group.results.umsatz); // ["Nord", "A"], 2, 220

Since

1.1.94

Type Parameters

  • T = any

    the row type

Hierarchy

  • RowGroupIf

Implemented by

Properties

children: RowGroupIf<T>[]

The sub-groups, empty on the last level.

count: number

The number of rows in the group (after the filter).

field: string

The name of the level (RowGroupFieldIf.name).

id: string

A stable id built from the level names and keys – the same data give the same id (persistence of expanded groups). Keys that are objects or symbols get an id per page load only (they can't be stored).

key: unknown

The key of the group, as the rows have it (null for the group of empty keys: null, undefined, "").

label: string

The key as text (format of the level, otherwise the default text).

level: number

The level, 0 = top.

parent: undefined | RowGroupIf<T>

The parent group, undefined on the top level.

path: readonly unknown[]

The keys from the top level down to this group.

results: Record<string, unknown>

The aggregates of the group by key (after the filter), e.g. { umsatz: 270 }.

type: "RowGroup"

Marker for isRowGroup (works across copies of the core).

Methods

  • The rows of the group and of all sub-groups, in the order of the grouped view: sub-group by sub-group, the rows of a group in source order – or sorted, after the table sorted them.

    Parameters

    • Optional filtered: boolean

      only the rows the filter keeps

    Returns T[]

    a new array