scrollToSelected(duration) {
// move to selected item
const select = ReactDom.findDOMNode(this);
- const list = ReactDom.findDOMNode(this.refs.list);
+ const list = ReactDom.findDOMNode(this.list);
if (!list) {
return;
}
this.setState({ active: false });
}
+ saveList = (node) => {
+ this.list = node;
+ }
+
render() {
if (this.props.options.length === 0) {
return null;
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
>
- <ul ref="list">{this.getOptions()}</ul>
+ <ul ref={this.saveList}>{this.getOptions()}</ul>
</div>
);
}