# @salmonui/data-grid/engine/grouping API reference

> 26 exported symbols of @salmonui/data-grid/engine/grouping: 2 functions, 4 interfaces and 20 types.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-grouping

```ts
import { … } from '@salmonui/data-grid/engine/grouping';
```

## Interfaces

### AggregateResult

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/engine-grouping/AggregateResult

```ts
interface AggregateResult extends AggregateModelSnapshot {
    readonly scope: AggregateScope;
    readonly descriptors: readonly AggregateDescriptor[];
    readonly tree: GroupTree | null;
    readonly order: Int32Array | null;
    readonly dataCount: number;
    readonly source: readonly unknown[];
    readonly columns: ReadonlyMap<ColumnId, ColumnStats>;
    readonly cache: Map<number, AggregateValues>;
}
```

Aggregate results of one row model; group `g` is slot `g`, the totals are slot `tree.count` (or 0 without groups).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `readonly scope: AggregateScope;` |  |  |
| `descriptors` | `readonly descriptors: readonly AggregateDescriptor[];` |  |  |
| `tree` | `readonly tree: GroupTree \| null;` |  |  |
| `order` | `readonly order: Int32Array \| null;` |  | Data order the values were computed over. |
| `dataCount` | `readonly dataCount: number;` |  |  |
| `source` | `readonly source: readonly unknown[];` |  |  |
| `columns` | `readonly columns: ReadonlyMap<ColumnId, ColumnStats>;` |  |  |

## Types

### GroupingLoadedCommand

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/engine-grouping/GroupingLoadedCommand

```ts
type GroupingLoadedCommand = {
    type: 'grouping.loaded';
    version: number;
};
```

Lazy mode: a load settled (dispatched by the engine; part of the public command union).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `type: 'grouping.loaded';` |  |  |
| `version` | `version: number;` |  |  |

## Re-exported entry points

- [@salmonui/data-grid/engine](https://salmonui.dev/docs/reference/data-grid/engine.md): 24 symbols: 2 functions, 3 interfaces and 19 types
  `GroupDescriptorInput`, `GroupRowSnapshot`, `GroupTarget`, `GroupingClearCommand`, `GroupingCollapseAllCommand`, `GroupingCommand`, `GroupingExpandAllCommand`, `GroupingGroupByCommand`, `GroupingLoadMoreCommand`, `GroupingMethods`, `GroupingModule`, `GroupingMoveCommand`, `GroupingOptions`, `GroupingRetryCommand`, `GroupingSetCommand`, `GroupingSetDirectionCommand`, `GroupingSetEnabledCommand`, `GroupingSetExpandedCommand`, `GroupingSetOptionsCommand`, `GroupingState`, `GroupingToggleCommand`, `GroupingUngroupCommand`, `createGroupingModule`, `groupTargetKey`
