Fix Bug 57690: current email when changing
This commit is contained in:
parent
66cdf0bdaf
commit
6619e40896
@ -15,13 +15,10 @@ class ChangeEmailDialogComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const { user } = props;
|
||||
const { email } = user;
|
||||
|
||||
this.state = {
|
||||
isEmailValid: true,
|
||||
isRequestRunning: false,
|
||||
email,
|
||||
email: "",
|
||||
hasError: false,
|
||||
errorMessage: "",
|
||||
emailErrors: [],
|
||||
@ -32,14 +29,6 @@ class ChangeEmailDialogComponent extends React.Component {
|
||||
window.addEventListener("keyup", this.onKeyPress);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { user } = this.props;
|
||||
const { email } = user;
|
||||
if (prevProps.user.email !== email) {
|
||||
this.setState({ email });
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("keyup", this.onKeyPress);
|
||||
}
|
||||
@ -156,6 +145,7 @@ class ChangeEmailDialogComponent extends React.Component {
|
||||
onValidateInput={this.onValidateEmailInput}
|
||||
onKeyUp={this.onKeyPress}
|
||||
hasError={hasError}
|
||||
placeholder={t("EnterEmail")}
|
||||
/>
|
||||
</FieldContainer>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user