From 4857023ab9803cfcf98787d3e0dad37a3152d447 Mon Sep 17 00:00:00 2001 From: Bibiana Cristofol Amat Date: Thu, 26 Feb 2026 12:19:46 +0000 Subject: [PATCH 1/3] insights: add a clear all filters button https://github.com/ThreeSixtyGiving/grantvis/issues/251 --- insights/static/js/data-display.js | 5 +++++ insights/templates/data-display.vue.j2 | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/insights/static/js/data-display.js b/insights/static/js/data-display.js index 7c2da75..75e5418 100644 --- a/insights/static/js/data-display.js +++ b/insights/static/js/data-display.js @@ -122,6 +122,11 @@ var app = new Vue({ this.currentApiUrl.searchParams.delete(id); this.updateData(`/search${this.currentApiUrl.search}`); }, + + clearAllFilters(){ + this.currentApiUrl = new URL(window.location.origin + window.location.pathname); + this.updateData("/search"); + }, }, computed: { filtersApplied(){ diff --git a/insights/templates/data-display.vue.j2 b/insights/templates/data-display.vue.j2 index 99fe55c..71cb98f 100644 --- a/insights/templates/data-display.vue.j2 +++ b/insights/templates/data-display.vue.j2 @@ -148,7 +148,12 @@