mirror of https://github.com/vector-im/riot-web
Merge pull request #2790 from jryans/reg-form-refs
Restore `Field` value getter for `RegistrationForm`pull/21833/head
commit
b29aa3d13d
|
@ -53,6 +53,12 @@ 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…
Reference in New Issue