mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-14 03:24:06 +00:00
Merge branch 'main' into fix/wider-max-width-1536
This commit is contained in:
commit
c9c70065fe
|
@ -332,7 +332,9 @@ export class Search extends Component<any, SearchState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
if (!this.state.isIsomorphic) {
|
if (
|
||||||
|
!(this.state.isIsomorphic || this.props.history.location.state?.searched)
|
||||||
|
) {
|
||||||
const promises = [this.fetchCommunities()];
|
const promises = [this.fetchCommunities()];
|
||||||
if (this.state.searchText) {
|
if (this.state.searchText) {
|
||||||
promises.push(this.search());
|
promises.push(this.search());
|
||||||
|
@ -1095,7 +1097,9 @@ export class Search extends Component<any, SearchState> {
|
||||||
sort: sort ?? urlSort,
|
sort: sort ?? urlSort,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.props.history.push(`/search${getQueryString(queryParams)}`);
|
this.props.history.push(`/search${getQueryString(queryParams)}`, {
|
||||||
|
searched: true,
|
||||||
|
});
|
||||||
|
|
||||||
await this.search();
|
await this.search();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue