Fix to allow close screen modal without navigating to a new page.
This commit is contained in:
parent
02de19e9d9
commit
870a6dd930
|
@ -48,9 +48,6 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"##eventHandlerType": "Close Screen Modal",
|
"##eventHandlerType": "Close Screen Modal",
|
||||||
parameters: {
|
|
||||||
url: actionUrl,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"##eventHandlerType": "Navigate To",
|
"##eventHandlerType": "Navigate To",
|
||||||
|
@ -71,9 +68,6 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"##eventHandlerType": "Close Screen Modal",
|
"##eventHandlerType": "Close Screen Modal",
|
||||||
parameters: {
|
|
||||||
url: actionUrl,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"##eventHandlerType": "Navigate To",
|
"##eventHandlerType": "Navigate To",
|
||||||
|
|
|
@ -225,7 +225,10 @@ const changeFormStepHandler = async (action, context) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeScreenModalHandler = action => {
|
const closeScreenModalHandler = action => {
|
||||||
let { url } = action.parameters
|
let url
|
||||||
|
if (action?.parameters) {
|
||||||
|
url = action.parameters.url
|
||||||
|
}
|
||||||
// Emit this as a window event, so parent screens which are iframing us in
|
// Emit this as a window event, so parent screens which are iframing us in
|
||||||
// can close the modal
|
// can close the modal
|
||||||
window.parent.postMessage({ type: "close-screen-modal", url })
|
window.parent.postMessage({ type: "close-screen-modal", url })
|
||||||
|
|
Loading…
Reference in New Issue