clear search results on restarting search

This commit is contained in:
2023-11-26 20:08:30 -07:00
parent 1cf6660e6c
commit c1176fa24d
2 changed files with 13 additions and 0 deletions

View File

@@ -213,6 +213,11 @@ export default class DiscoverView extends Vue {
}
public async searchAll(beforeId?: string) {
if (!beforeId) {
// this was an initial search so clear any previous results
this.projects = [];
}
let queryParams = "claimContents=" + encodeURIComponent(this.searchTerms);
if (beforeId) {
@@ -280,8 +285,14 @@ export default class DiscoverView extends Vue {
return;
}
if (!beforeId) {
// this was an initial search so clear any previous results
this.projects = [];
}
const claimContents =
"claimContents=" + encodeURIComponent(this.searchTerms);
let queryParams = [
claimContents,
"minLocLat=" + this.searchBox.bbox.minLat,