Pop Up on a condition

Hi All,

I have a use case to display pop up on click of a button. However it should be displayed only if specific flag is set to true. Can this be achieved ?

local!isDataEdited : false(), /*Confirm Message should only pop when this flag is set to true*/

a!buttonWidget(
label: "Back",
icon: "repeat",
saveinto: {},
submit: true,
style: "PRIMARY",
validate: false(),
confirmHeader: "",
confirmMessage: "Any changes will be lost if you continue to navigate away from this page.",
confirmButtonLabel: "Continue",
cancelButtonLabel: "Cancel"
)

Thank you and Appreciate your time and effort  !!

  Discussion posts and replies are publicly visible