Skip to content

Commit

Permalink
fix: wire up clear button for location filter
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Oct 31, 2024
1 parent 2622f81 commit b6050ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/filters/Location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ export default function Location(): JSX.Element {
<Button
aria-label="clear all species and length filters"
variant="secondary"
onPress={() => list.setSelectedKeys(new Set())}
onPress={() => {
// todo: clear sherlock input value once this enhancement is implemented: https://github.com/agrc/kitchen-sink/issues/340
list.remove(...list.items.map((item) => getKey(item)));
}}
>
Clear
</Button>
Expand Down

0 comments on commit b6050ce

Please sign in to comment.