JavaScript Event Reference
Currently available in beta
Admin Dashboard is currently available in beta, which means some of the features, specifications, and details provided herein are subject to change. We recommend checking back regularly for the most up-to-date information and viewing our roadmap in regard to the general availability release.
The admin dashboard modules make extensive use of the JavaScript event system. This page documents how each event is used.
configure-widget-type-{{WIDGET_TYPE_ID}}
This event is fired when the admin user selects a widget type to create or chooses to edit an existing widget instance. It is responsible for triggering the display of the widget configuration form modal.
When configuring a new widget instance, {{WIDGET_TYPE_ID}}
is replaced with the relevant widget type ID e.g.
conversion_rate
or recent_orders
etc.
When editing the configuration of an existing widget instance, {{WIDGET_TYPE_ID}}
is replaced with the relevant
widget instance ID.
dashboard-charts-ready
This event is fired once the ApexCharts library has loaded and is available through the window.ApexCharts
object.
See our ApexCharts documentation for more information.
disabled-widget-container-edit-mode
This event is fired when the admin user disables the dashboard "Edit Mode" by saving their positioning and sizing changes.
See the Dashboard Organisation user guide for more information.
enabled-widget-container-edit-mode
This event is fired when the admin user enables the dashboard "Edit Mode" by clicking either the widget menu's Resize
action or the dashboard toolbar's Customise Dashboard
button.
See the Dashboard Organisation user guide for more information.
new-widget-menu
This event is fired when the admin user clicks the Add Widget
button. It is responsible for displaying the widget
selection modal.
widget-config-form-close
This event is fired when the admin user closes the widget configuration modal. It is responsible for triggering the logic that warns them of any unsaved changes and performing any configuration form cleanup.
widget-config-form-open
widget-container-edit-mode-enabled
This event is fired by the widget container when "Edit Mode" is enabled. It is responsible for disabling the
Customise Dashboard
button.
See the Dashboard Organisation user guide for more information.
widget-container-edit-mode-disabled
This event is fired by the widget container when "Edit Mode" is disabled. It is responsible for re-enabling the
Customise Dashboard
button after the admin has saved their positioning and sizing changes.
See the Dashboard Organisation user guide for more information.
widget-container-initialised
This event is fired by the widget container once it has initialised.
widget-container-updated
This event is fired by the widget container once it has initialised and whenever a widget is added or removed from it.
widget-instance-created
This event is fired when the widget configuration form for a new widget instance has been saved successfully. It is responsible for telling the widget container component to insert a new widget.
widget-instance-data-updated
This event is fired when a widget instance successfully has its content updated - this happens once when the widget component is first initialised and subsequently when the admin user updates its configuration.
widget-instance-updated-{{WIDGET_INSTANCE_ID}}
This event is fired when the widget configuration form for an existing widget instance has been saved successfully. It
is responsible for telling the widget container component to update the widget instance content for the widget whose
instance ID matches {{WIDGET_INSTANCE_ID}}
.