# DataGridGroupChangeEvent (@salmonui/data-grid)

> The DataGridGroupChangeEvent interface of @salmonui/data-grid: onBeforeGroupChange / onGroupChange.

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

```ts
import type { DataGridGroupChangeEvent } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridGroupChangeEvent extends DataGridEvent {
    readonly groupBy: readonly string[];
    readonly previousGroupBy: readonly string[];
    readonly action: 'group' | 'ungroup' | 'move' | 'clear';
    readonly field: string | null;
}
```

`onBeforeGroupChange` / `onGroupChange`.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `groupBy` | `readonly groupBy: readonly string[];` |  | Grouped fields proposed (before) or applied (after). |
| `previousGroupBy` | `readonly previousGroupBy: readonly string[];` |  |  |
| `action` | `readonly action: 'group' \| 'ungroup' \| 'move' \| 'clear';` |  |  |
| `field` | `readonly field: string \| null;` |  | The column grouped, ungrouped, or moved; null for clear and set. |
| `type` | `type: string;` | inherited | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `source: DataGridEventSource;` | inherited |  |
| `defaultPrevented` | `defaultPrevented: boolean;` | inherited | True after `preventDefault()` (before-events and click events). |
| `preventDefault` | `preventDefault: () => void;` | inherited | Before-events and click events: cancels the action (or the built-in behavior). |
