diff options
Diffstat (limited to 'src/components/ui/Input.js')
-rw-r--r-- | src/components/ui/Input.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/ui/Input.js b/src/components/ui/Input.js index 7bf6e1b00..9b070c4df 100644 --- a/src/components/ui/Input.js +++ b/src/components/ui/Input.js | |||
@@ -33,6 +33,8 @@ export default @observer class Input extends Component { | |||
33 | passwordScore: 0, | 33 | passwordScore: 0, |
34 | } | 34 | } |
35 | 35 | ||
36 | inputElement = null; | ||
37 | |||
36 | componentDidMount() { | 38 | componentDidMount() { |
37 | if (this.props.focus) { | 39 | if (this.props.focus) { |
38 | this.focus(); | 40 | this.focus(); |
@@ -53,8 +55,6 @@ export default @observer class Input extends Component { | |||
53 | this.inputElement.focus(); | 55 | this.inputElement.focus(); |
54 | } | 56 | } |
55 | 57 | ||
56 | inputElement = null; | ||
57 | |||
58 | render() { | 58 | render() { |
59 | const { | 59 | const { |
60 | field, | 60 | field, |
@@ -110,7 +110,7 @@ export default @observer class Input extends Component { | |||
110 | 'mdi-eye': !this.state.showPassword, | 110 | 'mdi-eye': !this.state.showPassword, |
111 | 'mdi-eye-off': this.state.showPassword, | 111 | 'mdi-eye-off': this.state.showPassword, |
112 | })} | 112 | })} |
113 | onClick={() => this.setState({ showPassword: !this.state.showPassword })} | 113 | onClick={() => this.setState(prevState => ({ showPassword: !prevState.showPassword }))} |
114 | tabIndex="-1" | 114 | tabIndex="-1" |
115 | /> | 115 | /> |
116 | )} | 116 | )} |