Allow autoFocus on Autocomplete component

old
Vicky Lai 2017-09-21 12:53:42 -07:00
parent b381db4054
commit a8280917fb
1 changed files with 1 additions and 2 deletions

View File

@ -132,7 +132,7 @@ const factory = (Chip, Input) => {
};
handleQueryFocus = (event) => {
this.suggestionsNode.scrollTop = 0;
event.target.scrollTop = 0;
this.setState({ active: '', focus: true });
if (this.props.onFocus) this.props.onFocus(event);
};
@ -375,7 +375,6 @@ const factory = (Chip, Input) => {
return (
<ul
className={classnames(theme.suggestions, { [theme.up]: this.state.direction === 'up' })}
ref={(node) => { this.suggestionsNode = node; }}
>
{suggestions}
</ul>