fix: uncheck requires Confirmation For FreeEmail (#22486)

This commit is contained in:
Anik Dhabal Babu
2025-07-14 16:30:11 +00:00
committed by GitHub
parent cee30c53b8
commit 3de9c2bda0
@@ -104,9 +104,10 @@ export default function RequiresConfirmationController({
LockedIcon={requiresConfirmationLockedProps.LockedIcon}
onCheckedChange={(val) => {
formMethods.setValue("requiresConfirmation", val, { shouldDirty: true });
// If we uncheck requires confirmation, we also uncheck the "will block slot" checkbox
// If we uncheck requires confirmation, we also uncheck these checkboxes
if (!val) {
formMethods.setValue("requiresConfirmationWillBlockSlot", false, { shouldDirty: true });
formMethods.setValue("requiresConfirmationForFreeEmail", false, { shouldDirty: true });
}
onRequiresConfirmation(val);
}}>