mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-28 08:27:36 +00:00
Get rid of "No Results" showing while search is still loading. (#997)
This commit is contained in:
parent
70786146d3
commit
a027595eaa
|
@ -423,7 +423,9 @@ export class Search extends Component<any, SearchState> {
|
||||||
{this.selects}
|
{this.selects}
|
||||||
{this.searchForm}
|
{this.searchForm}
|
||||||
{this.displayResults(type)}
|
{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} />
|
<Paginator page={page} onChange={this.handlePageChange} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1002,7 +1004,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkFinishedLoading() {
|
checkFinishedLoading() {
|
||||||
if (this.state.searchResponse && this.state.resolveObjectResponse) {
|
if (this.state.searchResponse || this.state.resolveObjectResponse) {
|
||||||
this.setState({ searchLoading: false });
|
this.setState({ searchLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue