View as Markdown

API reference: @salmonui/data-grid/engine

GroupRowSnapshotinterface

import type { GroupRowSnapshot } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid, @salmonui/data-grid/engine/grouping.

interface GroupRowSnapshot {
    readonly id: RowId;
    readonly kind: 'group' | 'groupFooter';
    readonly index: number;
    readonly depth: number;
    readonly parentId: RowId | null;
    readonly path: readonly GroupPathSegment[];
    readonly pathKey: string;
    readonly columnId: ColumnId;
    readonly headerText: string;
    readonly key: Json;
    readonly value: unknown;
    readonly formattedKey: string;
    readonly count: number;
    readonly expanded: boolean;
    readonly aggregates: AggregateValues;
    readonly posInSet: number;
    readonly setSize: number;
    readonly status: LazyStatus;
    readonly error: unknown;
    readonly hasMore: boolean;
}

Caption or footer row of a group, for renderers and templates.

GroupRowSnapshot members (20)
NameSignatureDescription
idreadonly id: RowId;
kindreadonly kind: 'group' | 'groupFooter';
indexreadonly index: number;

Visible index.

depthreadonly depth: number;

Group level (0 = top).

parentIdreadonly parentId: RowId | null;
pathreadonly path: readonly GroupPathSegment[];
pathKeyreadonly pathKey: string;
columnIdreadonly columnId: ColumnId;
headerTextreadonly headerText: string;
keyreadonly key: Json;

JSON form of the key (path segment key).

valuereadonly value: unknown;

Raw key value (first row's value, or the group-by-format label).

formattedKeyreadonly formattedKey: string;
countreadonly count: number;

Data rows in the group (all of them, also in lazy mode).

expandedreadonly expanded: boolean;
aggregatesreadonly aggregates: AggregateValues;

Group aggregates as shown (page-wise when paged with scope: 'page').

posInSetreadonly posInSet: number;

1-based position among sibling groups and their number (aria-posinset, aria-setsize).

setSizereadonly setSize: number;
statusreadonly status: LazyStatus;

Lazy mode load state of the group's children; ready for local groups.

errorreadonly error: unknown;
hasMorereadonly hasMore: boolean;

Lazy mode: more children can be loaded (grouping.loadMore).