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

# singleEventTypeHandler()

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

Creates a [DashboardEventHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventhandler/index.md) instance that will be invoked for one specified event type.

**Signature:**

```typescript
export declare function singleEventTypeHandler(type: (DashboardEvents | ICustomDashboardEvent)["type"], handler: DashboardEventHandler["handler"]): DashboardEventHandler;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| type | ([DashboardEvents](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardevents/index.md) \| [ICustomDashboardEvent](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.icustomdashboardevent/index.md))["type"] | the type of event this handler should trigger for |
| handler | [DashboardEventHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventhandler/index.md)["handler"] | the actual event handling function |

**Returns:**

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