Skip to content

Confirmation Dialog

Usage Example

onBeforeRouteLeave(async () => {
  return new Promise<boolean>((res) => {
    modalStore
      .push(SCAConfirmationDialog, { title: "Leave without saving?" }, {}, { closeOnOverlayClick: false })
      .onClose<"confirm" | "cancel" | "abort">((data) => {
        if (!data || data === "abort" || data === "cancel") {
          res(false);
        } else {
          res(true);
        }
      });
  });
});

Button Texts