Skip to content

Commit bf0e26b

Browse files
authored
Merge pull request #41 from Syynth/master
Adds focus method to VirtualizedSelect
2 parents 92ae8ea + e82da82 commit bf0e26b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/VirtualizedSelect/VirtualizedSelect.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,19 @@ export default class VirtualizedSelect extends Component {
3737
}
3838
}
3939

40+
focus () {
41+
if (this._reactSelect) {
42+
return this._reactSelect.focus();
43+
}
44+
}
45+
4046
render () {
4147
const SelectComponent = this._getSelectComponent()
4248

4349
return (
4450
<SelectComponent
4551
{...this.props}
52+
ref={ref => { this._reactSelect = ref; }}
4653
menuRenderer={this._renderMenu}
4754
menuStyle={{ overflow: 'hidden' }}
4855
/>

0 commit comments

Comments
 (0)