IDashboardEventing
Dashboard() eventing configuration
export interface IDashboardEventing
Remarks
Dashboard Component eventing is divided into two major groups:
- 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 and DashboardEvents to learn more.
The infrastructural events are handled using callbacks. There are only few of these infr
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(Optional) Specify event handlers to register at the dashboard creation time. | |||
(registerEventHandler: (handler: DashboardEventHandler) => void, unregisterEventHandler: (handler: DashboardEventHandler) => void) => 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. | ||
(state: DashboardState, dispatch: DashboardDispatch) => void | (Optional) Specify callback that will be called each time the state changes. |
Property details
IDashboardEventing.eventHandlersproperty
Specify event handlers to register at the dashboard creation time.
eventHandlers?: DashboardEventHandler[];
Remarks
Note: all events that will be emitted during the initial load processing will have the initialLoad correlationId.
IDashboardEventing.onEventingInitializedproperty
Specify callback that will be called when the dashboard eventing subsystem initializes and it is possible to register new or unregister existing event handlers.
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 prop if you want to register handlers _before_ the dashboard initialization starts.
IDashboardEventing.onStateChangeproperty
Specify callback that will be called each time the state changes.
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 and useDashboardDispatch() hooks instead.