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

# useScheduledEmailSubmitOnEnter()

- 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/presentation/automations/scheduledEmail/state/useScheduledEmailSubmitOnEnter.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 Enter-to-submit key handler the default scheduled-export dialog attaches to its title, recipients and recurrence inputs: calls `onSubmit` on Enter unless the submit button would be disabled — the same guard [useScheduledEmailDialogActionBarProps()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.usescheduledemaildialogactionbarprops/index.md) puts on the button (form validity, a save in flight, execution-timestamp mode). Pass the result as `onTitleKeyDown` / `onKeyDownSubmit` to the header and recipients blocks so every Enter path shares the dialog's one save.

Throws outside the scheduled-export dialog's state providers.

**Signature:**

```typescript
export declare function useScheduledEmailSubmitOnEnter(input: IUseScheduledEmailSubmitOnEnterInput): (event: KeyboardEvent) => void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { onSubmit, isSaving, } | (not declared) |  |
| input | [IUseScheduledEmailSubmitOnEnterInput](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iusescheduledemailsubmitonenterinput/index.md) |  |

**Returns:**

(event: KeyboardEvent) =&gt; void
