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

# IDashboardEventing

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

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

**Signature:**

```typescript
export interface IDashboardEventing 
```

## Remarks

Dashboard Component eventing is divided into two major groups:

1. Domain events describing what is happening on the dashboard or with the dashboard 2. Infrastructural events required hook into different technical aspects of the dashboard component  implementation.

Dashboard Component treats the domain events using the typical pub-sub semantics. It is possible to register any number of subscribers for the different types of events. Types of events are enumerated and each event comes with its own type describing the contents. Please see [DashboardEventType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventtype/index.md) and [DashboardEvents](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardevents/index.md) to learn more.

The infrastructural events are handled using callbacks. There are only few of these infr

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [eventHandlers?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboardeventing/index.md#idashboardeventingeventhandlers) |  | [DashboardEventHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventhandler/index.md)[] | _(Optional)_ Specify event handlers to register at the dashboard creation time. |
| [onEventingInitialized?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboardeventing/index.md#idashboardeventingoneventinginitialized) |  | (registerEventHandler: (handler: [DashboardEventHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventhandler/index.md)) =&gt; void, unregisterEventHandler: (handler: [DashboardEventHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardeventhandler/index.md)) =&gt; void) =&gt; void | _(Optional)_ Specify callback that will be called when the dashboard eventing subsystem initializes and it is possible to register new or unregister existing event handlers. |
| [onStateChange?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboardeventing/index.md#idashboardeventingonstatechange) |  | (state: [DashboardState](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstate/index.md), dispatch: [DashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarddispatch/index.md)) =&gt; void | _(Optional)_ Specify callback that will be called each time the state changes. |

## Property details

### IDashboardEventing.eventHandlers

Specify event handlers to register at the dashboard creation time.

**Signature:**

```typescript
eventHandlers?: DashboardEventHandler[];
```

#### Remarks

Note: all events that will be emitted during the initial load processing will have the `initialLoad` correlationId.

### IDashboardEventing.onEventingInitialized

Specify callback that will be called when the dashboard eventing subsystem initializes and it is possible to register new or unregister existing event handlers.

**Signature:**

```typescript
onEventingInitialized?: (registerEventHandler: (handler: DashboardEventHandler) => void, unregisterEventHandler: (handler: DashboardEventHandler) => void) => void;
```

#### Remarks

Note: these callbacks allow modification of event handlers on an existing, initialized dashboard. See [IDashboardEventing.eventHandlers](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.idashboardeventing/index.md#idashboardeventingeventhandlers) prop if you want to register handlers \_before\_ the dashboard initialization starts.

### IDashboardEventing.onStateChange

Specify callback that will be called each time the state changes.

**Signature:**

```typescript
onStateChange?: (state: DashboardState, dispatch: DashboardDispatch) => void;
```

#### Remarks

Note: there is no need to use this in your own React components that you plug into the dashboard. Your React component code can use [useDashboardSelector](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.usedashboardselector/index.md) and [useDashboardDispatch()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.usedashboarddispatch/index.md) hooks instead.
