> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# undoLayoutChanges()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/model/commands/layout.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Creates the UndoLayoutChanges command.

**Signature:**

```typescript
export declare function undoLayoutChanges(undoPointSelector?: UndoPointSelector, correlationId?: string): IUndoLayoutChanges;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| undoPointSelector | [UndoPointSelector](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.undopointselector/index.md) | _(Optional)_ specify function to determine up to which command to undo; if not provided the very last command will be undone |
| correlationId | string | _(Optional)_ specify correlation id to use for this command. this will be included in all events that will be emitted during the command processing |

**Returns:**

[IUndoLayoutChanges](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iundolayoutchanges/index.md)

## Remarks

Dispatching this command will result in reverting the state of the layout to a point before a particular layout command processing.

By default, the very last command will be undone, however you can provide a function of your own to determine up to which command should the undo go.
