From a027595eaaf649defae6ea1b83e9a0a7767de7bd Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 Date: Thu, 4 May 2023 01:47:37 +0000 Subject: [PATCH] Get rid of "No Results" showing while search is still loading. (#997) --- src/shared/components/search.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/components/search.tsx b/src/shared/components/search.tsx index 53b56e8..946dd6a 100644 --- a/src/shared/components/search.tsx +++ b/src/shared/components/search.tsx @@ -423,7 +423,9 @@ export class Search extends Component { {this.selects} {this.searchForm} {this.displayResults(type)} - {this.resultsCount === 0 && {i18n.t("no_results")}} + {this.resultsCount === 0 && !this.state.searchLoading && ( + {i18n.t("no_results")} + )} ); @@ -1002,7 +1004,7 @@ export class Search extends Component { } checkFinishedLoading() { - if (this.state.searchResponse && this.state.resolveObjectResponse) { + if (this.state.searchResponse || this.state.resolveObjectResponse) { this.setState({ searchLoading: false }); } } -- 2.44.1