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

# UndoPointSelector

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: type-alias
- 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).
> 

The undo point selector function will be called during layout undo processing to determine up to (and including) which command should the undo be done. Commands are sorted in the list in reversed chronological order - last command processed command is at index 0, command before that at index 1 etc.

The function must return index of command up to (and including) which the undo should be done. It is not possible to undo just some command randomly.

**Signature:**

```typescript
export type UndoPointSelector = (undoableCommands: ReadonlyArray<DashboardLayoutCommands>) => number;
```
**References:** [DashboardLayoutCommands](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardlayoutcommands/index.md)
