0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(console): save sie when secondary method is disabled (#1410)

This commit is contained in:
Gao Sun 2022-07-04 22:53:27 +08:00 committed by GitHub
parent 10a9578651
commit 52fee4c422
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ const SignInMethodsForm = () => {
</div> </div>
); );
}), }),
[primaryMethod, register, t, email, social, sms] [t, primaryMethod, email, sms, social, control]
); );
return ( return (
@ -116,7 +116,11 @@ const SignInMethodsForm = () => {
)} )}
<FormField title="admin_console.sign_in_exp.sign_in_methods.enable_secondary"> <FormField title="admin_console.sign_in_exp.sign_in_methods.enable_secondary">
<Switch <Switch
{...register('signInMethods.enableSecondary', { required: true })} /**
* DO NOT SET THIS FIELD TO REQUIRED UNLESS YOU KNOW WHAT YOU ARE DOING.
* https://github.com/react-hook-form/react-hook-form/issues/2323
*/
{...register('signInMethods.enableSecondary')}
label={t('sign_in_exp.sign_in_methods.enable_secondary_description')} label={t('sign_in_exp.sign_in_methods.enable_secondary_description')}
/> />
</FormField> </FormField>