# updateAggregates (@salmonui/data-grid/engine/aggregates)

> The updateAggregates function of @salmonui/data-grid/engine/aggregates: Incremental update after updateGroupTree: recomputes the changed leaf groups from their rows and re-combines only their ancestor chains and the totals. Null when a full computation is needed.

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

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

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

## Reference

Kind: function

```ts
function updateAggregates<Row>(previous: AggregateResult, input: RowModelSnapshot<Row>, descriptors: readonly AggregateDescriptor[], delta: RowDelta, locale: string): AggregateResult | null;
```

Incremental update after `updateGroupTree`: recomputes the changed leaf
groups from their rows and re-combines only their ancestor chains and the
totals. Null when a full computation is needed.
