From 6619e408965af859a49dfd0e7ce4755cfd4fc247 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 21 Jun 2022 13:17:30 +0300 Subject: [PATCH] Fix Bug 57690: current email when changing --- .../components/dialogs/ChangeEmailDialog/index.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/products/ASC.People/Client/src/components/dialogs/ChangeEmailDialog/index.js b/products/ASC.People/Client/src/components/dialogs/ChangeEmailDialog/index.js index 4d46fa0ea4..aea6ae8259 100644 --- a/products/ASC.People/Client/src/components/dialogs/ChangeEmailDialog/index.js +++ b/products/ASC.People/Client/src/components/dialogs/ChangeEmailDialog/index.js @@ -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")} />