feat: show the popover on the top when window's width too small and close popover when password options is empty (#3952)

This commit is contained in:
DacongDA
2025-07-10 19:56:05 +08:00
committed by GitHub
parent cb5c7667b5
commit ef14c84edc
3 changed files with 7 additions and 7 deletions

View File

@ -607,7 +607,7 @@ class SignupPage extends React.Component {
}
} else if (signupItem.name === "Password") {
return (
<Popover placement="right" content={this.state.passwordPopover} open={this.state.passwordPopoverOpen}>
<Popover placement={window.innerWidth >= 960 ? "right" : "top"} content={this.state.passwordPopover} open={this.state.passwordPopoverOpen}>
<Form.Item
name="password"
className="signup-password"
@ -635,7 +635,7 @@ class SignupPage extends React.Component {
}}
onFocus={() => {
this.setState({
passwordPopoverOpen: true,
passwordPopoverOpen: application.organizationObj.passwordOptions?.length > 0,
passwordPopover: PasswordChecker.renderPasswordPopover(application.organizationObj.passwordOptions, this.form.current?.getFieldValue("password") ?? ""),
});
}}