Fixes #1034
parent
2a7010b022
commit
bf00d92d68
|
@ -120,10 +120,10 @@ const factory = (Chip, Input) => {
|
|||
this.setState({query: value, showAllSuggestions: false, active: null});
|
||||
};
|
||||
|
||||
handleQueryFocus = () => {
|
||||
handleQueryFocus = (event) => {
|
||||
this.suggestionsNode.scrollTop = 0;
|
||||
this.setState({active: '', focus: true});
|
||||
if (this.props.onFocus) this.props.onFocus();
|
||||
if (this.props.onFocus) this.props.onFocus(event);
|
||||
};
|
||||
|
||||
handleQueryKeyDown = (event) => {
|
||||
|
|
|
@ -14,6 +14,11 @@ class AutocompleteTest extends React.Component {
|
|||
}
|
||||
};
|
||||
|
||||
handleFocus = (event) => {
|
||||
console.log('This is focused');
|
||||
console.log(event);
|
||||
};
|
||||
|
||||
handleMultipleArrayChange = (value) => {
|
||||
this.setState({
|
||||
multipleArray: value,
|
||||
|
@ -48,6 +53,7 @@ class AutocompleteTest extends React.Component {
|
|||
allowCreate
|
||||
keepFocusOnChange
|
||||
label="Pick multiple elements..."
|
||||
onFocus={this.handleFocus}
|
||||
onChange={this.handleMultipleArrayChange}
|
||||
source={this.state.countriesObject}
|
||||
suggestionMatch="anywhere"
|
||||
|
|
Loading…
Reference in New Issue