SidePaneClose Event
This event is used to listen to SidePane close events of a particular SidePane. You
must create the SidePaneContext object on top of which they call the SidePaneClose
Event subscribe
API, by passing their interested ID of the
SidePane.
Here's a TypeScript example:
const listenSidePaneCloseEvent = async () => {
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext: ISidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload: IEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('cxEventBusSidePaneCloseEvent');
sidePaneContext.subscribe(payload, (res: IEventResponse) => {
const response:ISidePaneCloseEventResponse = res as ISidePaneCloseEventResponse;
const sidePaneCloseData: ISidePaneCloseData = response.getResponseData();
const id: string = sidePaneCloseData.getId();
})
}
Here's a JavaScript example:
const listenSidePaneCloseEvent = async () => {
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const sidePaneContext = await uiEventsFrameworkInstance.getSidePaneContext('sidePaneId');
const payload = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('cxEventBusSidePaneCloseEvent');
sidePaneContext.subscribe(payload, (res) => {
const sidePaneCloseData = response.getResponseData();
const id = sidePaneCloseData.getId();
});
}