onEvent
Definition
onEvent is an optional host callback invoked by the DimensionIQWidget when the widget wishes to publish an application-defined event.
This callback is typically used to support multi-client synchronization scenarios, where a change made within one widget instance should be communicated to other connected clients.
The widget determines when an event should be emitted and what information should be included in the event payload. The host application is responsible for publishing the event to its chosen synchronization mechanism, such as REST API, WebSocket, Server-Sent Events (SSE), or message bus.
Function Signature
Function Signature
onEvent: (event: DIQ_Event) => void;
Callback Parameters
event
Type: DIQ_Event
Description: The DIQ_Event object from the widget.
Examples
onEvent