# createGroupingModule (@salmonui/data-grid/engine)

> The createGroupingModule function of @salmonui/data-grid/engine: Creates the grouping module. Options come from options.grouping (GroupingOptions); the initial grouping from options.defaultQuery.grouping. Register createSortModule() too so the grouped order comes from the shared sort keys; without it the group stage sorts by the group keys itself.

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

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

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

Entry index: https://salmonui.dev/docs/reference/data-grid/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine.md).

## Reference

Kind: function

```ts
function createGroupingModule<Row>(): GroupingModule<Row>;
```

Creates the `grouping` module. Options come from
`options.grouping` (`GroupingOptions`); the initial grouping from
`options.defaultQuery.grouping`. Register `createSortModule()` too so the
grouped order comes from the shared sort keys; without it the group stage
sorts by the group keys itself.
