dont set whitelist until click set button in dialog

This commit is contained in:
miloschwartz
2026-06-09 14:36:50 -07:00
parent 6581ccafa3
commit cdb43d9658
2 changed files with 18 additions and 30 deletions
@@ -684,19 +684,11 @@ export function PolicyAuthStackSectionEdit({
openMethodEditor("email")
}
onToggle={(active) =>
handleToggle(
"email",
active,
() =>
form.setValue(
"emailWhitelistEnabled",
false
),
() =>
form.setValue(
"emailWhitelistEnabled",
true
)
handleToggle("email", active, () =>
form.setValue(
"emailWhitelistEnabled",
false
)
)
}
disabled={authReadonly || !emailEnabled}
@@ -761,7 +753,10 @@ export function PolicyAuthStackSectionEdit({
emailEnabled={emailEnabled}
disabled={authReadonly}
emails={emails}
onSave={(value) => form.setValue("emails", value)}
onSave={(value) => {
form.setValue("emails", value);
form.setValue("emailWhitelistEnabled", true);
}}
/>
<HeaderAuthCredenza