openModal

Opens a modal component.

署名

コピー
1

Parameters

名称タイプ説明
componentIdストリングID of the component to show in the modal, as defined in Wix Developer Center.
componentParamsRecord<string, any>Optional. Custom data to pass into the component, the component may consume this data using observeState

リターン

コピー
1

注: Do not use relative CSS height units such as vh in the components passed to this function. The SDK adjusts component heights automatically. If your component uses relative height units by default, make sure to turn them off.

To set up a dashboard client, refer to the setup guide.

Open a modal

コピー
1

Pass extra data when opening a modal

コピー
1
  • This data can be consumed using the observeState function.
  • Note: Changes to the data passed into the modal won't trigger an update with observeState (unlike the regular behavior of this method, that allows to obeserve to data changes).

Get notified when the modal is closed

コピー
1
役に立ちましたか?
はい
いいえ