Explorar el Código

change variable

itizawa hace 6 años
padre
commit
430f0e8d12
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      src/client/js/components/Admin/Users/UserInviteModal.jsx

+ 4 - 4
src/client/js/components/Admin/Users/UserInviteModal.jsx

@@ -16,7 +16,7 @@ class UserInviteModal extends React.Component {
     super(props);
     super(props);
 
 
     this.state = {
     this.state = {
-      email: '',
+      emailInputValue: '',
       sendEmail: false,
       sendEmail: false,
     };
     };
 
 
@@ -26,7 +26,7 @@ class UserInviteModal extends React.Component {
   }
   }
 
 
   validEmail() {
   validEmail() {
-    return this.state.email.match(/.+@.+\..+/) != null;
+    return this.state.emailInputValue.match(/.+@.+\..+/) != null;
   }
   }
 
 
   async handleSubmit() {
   async handleSubmit() {
@@ -43,7 +43,7 @@ class UserInviteModal extends React.Component {
   }
   }
 
 
   handleInput(event) {
   handleInput(event) {
-    this.setState({ email: event.target.value });
+    this.setState({ emailInputValue: event.target.value });
   }
   }
 
 
   handleCheckBox() {
   handleCheckBox() {
@@ -66,7 +66,7 @@ class UserInviteModal extends React.Component {
             className="form-control"
             className="form-control"
             placeholder="e.g. user@growi.org"
             placeholder="e.g. user@growi.org"
             style={{ height: '200px' }}
             style={{ height: '200px' }}
-            value={this.state.email}
+            value={this.state.emailInputValue}
             onChange={this.handleInput}
             onChange={this.handleInput}
           />
           />
           {!this.validEmail() && <p className="m-2 text-danger">{ t('user_management.valid_email') }</p>}
           {!this.validEmail() && <p className="m-2 text-danger">{ t('user_management.valid_email') }</p>}