fix missign focus method

This commit is contained in:
btzr-io 2017-10-15 14:39:19 -06:00 committed by Jeremy Kauffman
parent 9dffde221c
commit ee08f38cd8
2 changed files with 8 additions and 0 deletions

View file

@ -105,6 +105,10 @@ export class FormRow extends React.PureComponent {
return this._field.getOptions();
}
focus() {
this._field.focus();
}
onFocus() {
this.setState({ isFocus: true });
}

View file

@ -124,6 +124,10 @@ class FormField extends React.PureComponent {
this.props.onBlur && this.props.onBlur();
}
focus() {
this.refs.field.focus();
}
render() {
// Pass all unhandled props to the field element
const otherProps = Object.assign({}, this.props),