0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-24 22:41:28 -05:00

fix(console): fix sign-in methods deletion error (#3514)

This commit is contained in:
Xiao Yijun 2023-03-19 23:04:36 +08:00 committed by GitHub
parent 0bfd8509fb
commit 44c875270d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -103,7 +103,10 @@ const SignUpForm = () => {
// Note: we need to revalidate the sign-in methods after we have submitted
if (submitCount) {
void trigger('signIn.methods');
// Note: wait for the form to be updated before validating the new data.
setTimeout(() => {
void trigger('signIn.methods');
}, 0);
}
};

View file

@ -35,7 +35,10 @@ const SignInMethodEditBox = () => {
const revalidate = () => {
if (submitCount) {
void trigger(`signIn.methods`);
// Note: wait for the form to be updated before validating the new data.
setTimeout(() => {
void trigger('signIn.methods');
}, 0);
}
};