IDashboard
This is the programmatic interface of the Dashboard. It is created during the dashboard initialization phase.
Properties
Name | Type | Description |
---|---|---|
CustomData | any | Returns the dashboard object's custom data that was specified when the dashboard was opened. |
Events | IEvents | Returns the event registering interface of the IDashboard interface. |
IsPopupDashboard | boolean | Indicates whether the dashboard is opened in an own dialog instead of the embedded panes (right pane or listing pane). |
ShellFrame | IShellFrame | The Shellframe for the dashboard. |
Window | IWindow | Returns the dashboard's underlying window object. |
Methods
Name | Description |
---|---|
ShowMessage | Shows the default M-Files message box with the specified content and appearance. |
ShowPopupDashboard | Shows a dashboard in popup window. |
UpdateCustomData | Refreshes React metadata card content. |
WaitForClose | Wait for close dashboard. |
Events
CustomDataChanged
Custom data on dashboard has changed.
MFiles.Event.CustomDataChanged
Arguments:
- data :
any
New custom data for the dashboard
Example Code
const eventHandle = await dashboard.Events.Register(
MFiles.Event.CustomDataChanged,
(
data, // `any`
) => {
// Handle event
},
);
// Later unregister the event
dashboard.Events.Unregister(eventHandle);
Refresh
MFiles.Event.Refresh
Event has no arguments
Example Code
const eventHandle = await dashboard.Events.Register(
MFiles.Event.Refresh,
() => {
// Handle event
},
);
// Later unregister the event
dashboard.Events.Unregister(eventHandle);
Started
Sent when the object turns to started state.
MFiles.Event.Started
Event has no arguments
Example Code
const eventHandle = await dashboard.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);
// Later unregister the event
dashboard.Events.Unregister(eventHandle);
Stop
Sent before the object is stopped.
MFiles.Event.Stop
Event has no arguments
Example Code
const eventHandle = await dashboard.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});
// Later unregister the event
dashboard.Events.Unregister(eventHandle);