I figure it’s probably expected behaviour, but I need to confirm. I’m popping up a flag using Forge bridge’s showFlag
function. The flag includes a close
action.
const { close } = showFlag({
id: 'my-flag',
title: 'This is a flag',
description: `Flags are nice`,
type: 'success',
appearance: 'success',
actions: [{
text: 'Close',
onClick: () => {
close().then(() => true);
},
}],
isAutoDismiss: false,
});
It works fine while I’m still viewing the Forge custom UI that created the flag, but if I navigate away, the close
action simply doesn’t work.
I figure it’s because the JavaScript behind the flag went away when I navigated to another page. Is that correct? Is there a way that I can have the flag actions work even after the navigation event?