Browse Source

clear search results on restarting search

kb/add-usage-guide
Trent Larson 1 year ago
parent
commit
c1176fa24d
  1. 2
      project.task.yaml
  2. 11
      src/views/DiscoverView.vue

2
project.task.yaml

@ -7,6 +7,7 @@ tasks:
- 40 notifications :
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew
- .3 on DiscoverView QuickSearch, the 'keyup.enter' only runs searchAll, so do the right thing for searchLocal
- .5 allow to manage their notifications even without an identity
- .5 bug - on the discover page, enter a search term and search and see a duplicate project show at the end of the list
- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s)
@ -49,6 +50,7 @@ tasks:
- 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie)
- Release Minimum Viable Product :
- .5 deploy endorser.ch server above v 3.4.3 (to get plan searches by names as well as descriptions)
- 08 thorough testing for errors & edge cases
- 01 ensure ability to recover server remotely, and add redundant access
- Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot).

11
src/views/DiscoverView.vue

@ -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,

Loading…
Cancel
Save