Skip to content

Commit b54847b

Browse files
committed
Selecting timePeriods populates the custom duration field
1 parent 2b36e26 commit b54847b

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,12 @@ export function TimeFilter() {
290290
);
291291
}
292292

293-
// Get initial custom duration state from a period string (only if it's not a preset)
293+
// Get initial custom duration state from a period string
294294
function getInitialCustomDuration(period?: string): { value: string; unit: string } {
295295
if (period) {
296-
// Don't populate custom field if it's a preset period
297-
const isPreset = timePeriods.some((p) => p.value === period);
298-
if (!isPreset) {
299-
const parsed = parsePeriodString(period);
300-
if (parsed) {
301-
return { value: parsed.value.toString(), unit: parsed.unit };
302-
}
296+
const parsed = parsePeriodString(period);
297+
if (parsed) {
298+
return { value: parsed.value.toString(), unit: parsed.unit };
303299
}
304300
}
305301
return { value: "", unit: "m" };

0 commit comments

Comments
 (0)