Skip to content

Commit

Permalink
Fixed clear all filters button.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Dec 13, 2023
1 parent 9f73aba commit 310cf0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/metrics/FilterTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export function FilterTags({ params }) {
}

function handleCloseFilter(param?: string) {
if (!param) {
router.push(makeUrl({ view }, true));
} else {
router.push(makeUrl({ [param]: undefined }));
}
router.push(makeUrl({ [param]: undefined }));
}

function handleResetFilter() {
router.push(makeUrl({ view }, true));
}

return (
Expand All @@ -44,7 +44,7 @@ export function FilterTags({ params }) {
</div>
);
})}
<Button size="sm" variant="quiet" onClick={handleCloseFilter}>
<Button size="sm" variant="quiet" onClick={handleResetFilter}>
<Icon>
<Icons.Close />
</Icon>
Expand Down

0 comments on commit 310cf0b

Please sign in to comment.