Opens a dashboard modal extension on your app's dashboard page.
Note: Before you use this function, you need a dashboard modal extension. Learn more about implementing dashboard modal extensions with the Wix CLI and in self-hosted apps.
Name | Type | Description |
---|---|---|
modalInfo | ModalInfo | Information about the dashboard modal to open. |
Note: openModal()
used to accept 2 parameters: modalId
and params
. These parameters have been wrapped inside a modalInfo
object. Using 2 parameters is deprecated but still supported.
ModalInfo
ObjectName | Type | Description |
---|---|---|
modalId | string | ID of the dashboard modal extension to open, as defined in the Wix Dev Center. |
params | Record<string, any> | Optional. Custom data to pass into the dashboard modal extension. The extension can access this data using observeState() . |
Note: Do not use relative CSS height units such as vh
in the extensions opened by this function. Extension heights are adjusted automatically. If your extension uses relative height units by default, make sure to turn them off.
Note: To use this method in self-hosted apps, you need to create a client. See the setup guide for more details.
You can access the data passed to openModal()
in your extension code using observeState()
.