addEventHandler()
Home > @gooddata/sdk-ui-dashboard > IDashboardEventHandling > addEventHandler
IDashboardEventHandling.addEventHandler() method
Adds a handler for particular event type.
Signature:
addEventHandler<TEvents extends DashboardEvents | ICustomDashboardEvent>(eventType: DashboardEventType | string | "*", callback: DashboardEventHandlerFn<TEvents>): IDashboardEventHandling;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| eventType | DashboardEventType | string | "*" | type of the event to handle; this can be either built-event event type (see DashboardEventType), a custom event type or  | 
| callback | DashboardEventHandlerFn<TEvents> | function to call when the event occurs | 
Returns:
Remarks
Every time event of that type occurs, the provided callback function will be triggered.