Remove refs from RegistrationForm
This aligns the code in `RegistrationForm` with other users of the `Field` component. (In https://github.com/matrix-org/matrix-react-sdk/pull/2780, I had thought that this code would be okay to leave alone, but I had missed the usage of the `Field` value getter.) Fixes https://github.com/vector-im/riot-web/issues/9172
This commit is contained in:
parent
c70925ab0d
commit
ec51aee656
2 changed files with 53 additions and 36 deletions
|
@ -53,12 +53,6 @@ export default class Field extends React.PureComponent {
|
|||
};
|
||||
}
|
||||
|
||||
/* TODO: Remove this once `RegistrationForm` no longer uses refs */
|
||||
get value() {
|
||||
if (!this.refs.fieldInput) return null;
|
||||
return this.refs.fieldInput.value;
|
||||
}
|
||||
|
||||
onChange = (ev) => {
|
||||
if (this.props.onValidate) {
|
||||
const result = this.props.onValidate(ev.target.value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue