Skip to content

Commit

Permalink
Remove closeList
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaDerevyankina committed Aug 18, 2020
1 parent 9897894 commit 242e774
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,6 @@ export class QueryStringInputUI extends Component<Props, State> {
});
};

closeSuggestionsList = () => this.setState({ isSuggestionsVisible: false, index: null });

public render() {
const isSuggestionsVisible = this.state.isSuggestionsVisible && {
'aria-controls': 'kbnTypeahead__items',
Expand Down Expand Up @@ -646,7 +644,6 @@ export class QueryStringInputUI extends Component<Props, State> {
onClick={this.onClickSuggestion}
onMouseEnter={this.onMouseEnterSuggestion}
loadMore={this.increaseLimit}
closeList={this.closeSuggestionsList}
queryBarInputDivRef={this.queryBarInputDivRefInstance}
dropdownHeight={this.props.dropdownHeight}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ interface Props {
show: boolean;
suggestions: QuerySuggestion[];
loadMore: () => void;
closeList: () => void;
queryBarInputDivRef: RefObject<HTMLDivElement>;
dropdownHeight?: string;
}
Expand Down Expand Up @@ -172,7 +171,7 @@ export class SuggestionsComponent extends Component<Props> {
event.target &&
this.kbnTypeaheadDivRefInstance.current.contains(event.target as Node) === false
) {
this.props.closeList();
this.updatePosition();
}
};

Expand Down

0 comments on commit 242e774

Please sign in to comment.