Skip to content

Commit 2cf6a98

Browse files
committed
Adds defaultPeriod to the dep array
1 parent 5d9abbb commit 2cf6a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/components/runs/v3/SharedFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function TimeDropdown({
350350
const isCustom = period && !timePeriods.some((p) => p.value === period) && parsed.value !== "";
351351
setSelectedPeriod(isCustom ? "custom" : period ?? defaultPeriod);
352352
setActiveSection(from || to ? "dateRange" : "duration");
353-
}, [period, from, to]);
353+
}, [period, from, to, defaultPeriod]);
354354

355355
const isCustomDurationValid = (() => {
356356
const value = parseInt(customValue, 10);

0 commit comments

Comments
 (0)