mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-15 22:31:32 +01:00
Restore Field value getter for RegistrationForm
When working on the `Field` validation support, I thought `RegistrationForm`'s refs would be okay to leave as is, but I missed that they also depended on the value getter. For the moment, it's quicker to temporarily revive the value getter to get registration working. Fixes https://github.com/vector-im/riot-web/issues/9171
This commit is contained in:
parent
45063cad4a
commit
c70925ab0d
@ -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…
x
Reference in New Issue
Block a user