feat: fix bug that the password input disappears in login window (#2051)

Signed-off-by: baihhh <2542274498@qq.com>
This commit is contained in:
Baihhh
2023-07-08 23:46:31 +08:00
committed by GitHub
parent a58df645bf
commit ae6e35ee73

View File

@ -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)});