fix: allow username submission after failure

If the server rejects a username submission, the submit button became
stuck as disabled.  This ensures that new (valid) input will unlock the
button.
This commit is contained in:
Oliver Eyton-Williams
2019-11-11 20:21:00 +01:00
committed by mrugesh
parent e1236a0c15
commit 265e383705

View File

@ -101,7 +101,8 @@ class UsernameSettings extends Component {
{ {
formValue: newValue, formValue: newValue,
isFormPristine: username === newValue, isFormPristine: username === newValue,
characterValidation: this.validateFormInput(newValue) characterValidation: this.validateFormInput(newValue),
submitClicked: false
}, },
() => () =>
this.state.isFormPristine || this.state.characterValidation.error this.state.isFormPristine || this.state.characterValidation.error