Skip to content

Commit

Permalink
Button to reset all filters. #463
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Feb 8, 2024
1 parent 33cbd92 commit c4e0120
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/browse/Filters.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,18 @@
function metersToMiles(x: number): number {
return x * 0.000621371;
}
function resetFilters() {
filterAuthority = "";
filterFundingProgramme = "";
filterCurrentMilestone = "";
$filterInterventionText = "";
$filterSchemeText = "";
}
</script>

<CollapsibleCard label="Filters">
<SecondaryButton on:click={resetFilters}>Reset all filters</SecondaryButton>
<Select
label="Authority or region"
id="filterAuthority"
Expand Down

0 comments on commit c4e0120

Please sign in to comment.