Skip to content

Commit

Permalink
Fix: stop display of options when fetching suggestions (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Dec 7, 2020
1 parent b64a110 commit 4aad40d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,12 @@ class AutoComplete extends Component<IAutoCompleteProps, IAutoCompleteState> {
if (!requestUrl) {
this.props.actions!.fetchAutoCompleteOptions('', queryVersion);
} else {
this.props.actions!.fetchAutoCompleteOptions(requestUrl, queryVersion);
if (!this.props.autoCompleteOptions || `${requestUrl}` !== this.props.autoCompleteOptions.url) {
this.props.actions!.fetchAutoCompleteOptions(requestUrl, queryVersion);
} else {
this.performLocalSearch(url);
}
}
this.performLocalSearch(url);
}
}

Expand Down

0 comments on commit 4aad40d

Please sign in to comment.