mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 07:51:31 +00:00
fix missign focus method
This commit is contained in:
parent
9dffde221c
commit
ee08f38cd8
2 changed files with 8 additions and 0 deletions
|
@ -105,6 +105,10 @@ export class FormRow extends React.PureComponent {
|
||||||
return this._field.getOptions();
|
return this._field.getOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
focus() {
|
||||||
|
this._field.focus();
|
||||||
|
}
|
||||||
|
|
||||||
onFocus() {
|
onFocus() {
|
||||||
this.setState({ isFocus: true });
|
this.setState({ isFocus: true });
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,10 @@ class FormField extends React.PureComponent {
|
||||||
this.props.onBlur && this.props.onBlur();
|
this.props.onBlur && this.props.onBlur();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
focus() {
|
||||||
|
this.refs.field.focus();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// Pass all unhandled props to the field element
|
// Pass all unhandled props to the field element
|
||||||
const otherProps = Object.assign({}, this.props),
|
const otherProps = Object.assign({}, this.props),
|
||||||
|
|
Loading…
Add table
Reference in a new issue