|
@@ -52,6 +52,8 @@ class Login extends React.Component {
|
52
|
52
|
this.setState(prev => ({inputRememberMe: !prev.inputRememberMe}))
|
53
|
53
|
}
|
54
|
54
|
|
|
55
|
+ handleInputKeyPress = e => e.key === 'Enter' && this.handleClickSubmit()
|
|
56
|
+
|
55
|
57
|
handleClickSubmit = async () => {
|
56
|
58
|
const { history, dispatch, t } = this.props
|
57
|
59
|
const { inputLogin, inputPassword, inputRememberMe } = this.state
|
|
@@ -142,6 +144,7 @@ class Login extends React.Component {
|
142
|
144
|
isInvalid={this.state.inputLogin.isInvalid}
|
143
|
145
|
value={this.state.inputLogin.value}
|
144
|
146
|
onChange={this.handleChangeLogin}
|
|
147
|
+ onKeyPress={this.handleInputKeyPress}
|
145
|
148
|
/>
|
146
|
149
|
|
147
|
150
|
<InputGroupText
|
|
@@ -154,6 +157,7 @@ class Login extends React.Component {
|
154
|
157
|
isInvalid={this.state.inputPassword.isInvalid}
|
155
|
158
|
value={this.state.inputPassword.value}
|
156
|
159
|
onChange={this.handleChangePassword}
|
|
160
|
+ onKeyPress={this.handleInputKeyPress}
|
157
|
161
|
/>
|
158
|
162
|
|
159
|
163
|
<div className='row align-items-center mt-4 mb-4'>
|