Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2790 from jryans/reg-form-refs
Browse files Browse the repository at this point in the history
Restore `Field` value getter for `RegistrationForm`
  • Loading branch information
jryans committed Mar 14, 2019
2 parents 45063ca + c70925a commit b29aa3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/views/elements/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b29aa3d

Please sign in to comment.