You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a webapp plugin needs to open a modal for its own use, it should use the globally exposed window.openModal function. This is recommended because it allows the core webapp to properly handle the lifecycle of the component.
cwarnermm
changed the title
Recommend using openModal in webapp plugin development guide
Help Wanted: Recommend using openModal in webapp plugin development guide
Feb 25, 2022
Related ticket https://mattermost.atlassian.net/browse/MM-41610
This change should be placed in a new file in the webapp plugin development guide https://developers.mattermost.com/integrate/plugins/webapp
Proposed addition to Documentation
If a webapp plugin needs to open a modal for its own use, it should use the globally exposed window.openModal function. This is recommended because it allows the core webapp to properly handle the lifecycle of the component.
Here's an example of using this function:
my-plugin-id
,my-modal-id
, with appropriate values.dialogType
should be a React component implemented by the plugin. This is the component that will be instantiated whenopenModal
is called.dialogProps
object as React props.The text was updated successfully, but these errors were encountered: