Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Don't clear date range when clearing filters

Tim Wilson461d0e9387dd
diff --git a/apps/web/ui/analytics/toggle.tsx b/apps/web/ui/analytics/toggle.tsx
index d184237cce..7cdeb1d6fc 100644
--- a/apps/web/ui/analytics/toggle.tsx
+++ b/apps/web/ui/analytics/toggle.tsx
@@ -526,7 +526,10 @@ export default function Toggle() {
}
onRemoveAll={() =>
queryParams({
- del: VALID_ANALYTICS_FILTERS,
+ // Reset all filters except for date range
+ del: VALID_ANALYTICS_FILTERS.filter(
+ (f) => !["interval", "start", "end"].includes(f),
+ ),
})
}
/>