Allow autoFocus on Autocomplete component
parent
b381db4054
commit
a8280917fb
|
@ -132,7 +132,7 @@ const factory = (Chip, Input) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleQueryFocus = (event) => {
|
handleQueryFocus = (event) => {
|
||||||
this.suggestionsNode.scrollTop = 0;
|
event.target.scrollTop = 0;
|
||||||
this.setState({ active: '', focus: true });
|
this.setState({ active: '', focus: true });
|
||||||
if (this.props.onFocus) this.props.onFocus(event);
|
if (this.props.onFocus) this.props.onFocus(event);
|
||||||
};
|
};
|
||||||
|
@ -375,7 +375,6 @@ const factory = (Chip, Input) => {
|
||||||
return (
|
return (
|
||||||
<ul
|
<ul
|
||||||
className={classnames(theme.suggestions, { [theme.up]: this.state.direction === 'up' })}
|
className={classnames(theme.suggestions, { [theme.up]: this.state.direction === 'up' })}
|
||||||
ref={(node) => { this.suggestionsNode = node; }}
|
|
||||||
>
|
>
|
||||||
{suggestions}
|
{suggestions}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue