diff --git a/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx b/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx index 6c73718ba8..81c7bc1286 100644 --- a/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx +++ b/js/apps/admin-ui/src/authentication/BindFlowDialog.tsx @@ -22,7 +22,7 @@ type BindingForm = { type BindFlowDialogProps = { flowAlias: string; - onClose: () => void; + onClose: (used?: boolean) => void; }; export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => { @@ -44,7 +44,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => { addError("updateFlowError", error); } - onClose(); + onClose(true); }; const flowKeys = Array.from(REALM_FLOWS.keys()); @@ -62,7 +62,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => { data-testid="cancel" key="cancel" variant={ButtonVariant.link} - onClick={onClose} + onClick={() => onClose()} > {t("cancel")} , diff --git a/js/apps/admin-ui/src/authentication/FlowDetails.tsx b/js/apps/admin-ui/src/authentication/FlowDetails.tsx index fcd99adaa4..d5cfe05c2b 100644 --- a/js/apps/admin-ui/src/authentication/FlowDetails.tsx +++ b/js/apps/admin-ui/src/authentication/FlowDetails.tsx @@ -45,7 +45,7 @@ import { LevelChange, } from "./execution-model"; import { toAuthentication } from "./routes/Authentication"; -import type { FlowParams } from "./routes/Flow"; +import { toFlow, type FlowParams } from "./routes/Flow"; export const providerConditionFilter = ( value: AuthenticationProviderRepresentation, @@ -310,9 +310,16 @@ export default function FlowDetails() { {bindFlowOpen && ( { + onClose={(usedBy) => { toggleBindFlow(); - refresh(); + navigate( + toFlow({ + realm, + id: id!, + usedBy: usedBy ? "DEFAULT" : "notInUse", + builtIn: builtIn ? "builtIn" : undefined, + }), + ); }} /> )}