From ae6e35ee73331eb5bf7beb14ff21f2b6ae3ac4ce Mon Sep 17 00:00:00 2001 From: Baihhh <63110802+Baihhh@users.noreply.github.com> Date: Sat, 8 Jul 2023 23:46:31 +0800 Subject: [PATCH] feat: fix bug that the password input disappears in login window (#2051) Signed-off-by: baihhh <2542274498@qq.com> --- web/src/auth/LoginPage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 3df962e1..92a06d4a 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -82,6 +82,10 @@ class LoginPage extends React.Component { } componentDidUpdate(prevProps, prevState, snapshot) { + if (prevState.loginMethod === undefined && this.state.loginMethod === undefined) { + const application = this.getApplicationObj(); + this.setState({loginMethod: this.getDefaultLoginMethod(application)}); + } if (prevProps.application !== this.props.application) { this.setState({loginMethod: this.getDefaultLoginMethod(this.props.application)});