Get rid of "No Results" showing while search is still loading. (#997)
This commit is contained in:
parent
70786146d3
commit
a027595eaa
1 changed files with 4 additions and 2 deletions
|
@ -423,7 +423,9 @@ export class Search extends Component<any, SearchState> {
|
|||
{this.selects}
|
||||
{this.searchForm}
|
||||
{this.displayResults(type)}
|
||||
{this.resultsCount === 0 && <span>{i18n.t("no_results")}</span>}
|
||||
{this.resultsCount === 0 && !this.state.searchLoading && (
|
||||
<span>{i18n.t("no_results")}</span>
|
||||
)}
|
||||
<Paginator page={page} onChange={this.handlePageChange} />
|
||||
</div>
|
||||
);
|
||||
|
@ -1002,7 +1004,7 @@ export class Search extends Component<any, SearchState> {
|
|||
}
|
||||
|
||||
checkFinishedLoading() {
|
||||
if (this.state.searchResponse && this.state.resolveObjectResponse) {
|
||||
if (this.state.searchResponse || this.state.resolveObjectResponse) {
|
||||
this.setState({ searchLoading: false });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue