File tree Expand file tree Collapse file tree
apps/webapp/app/components/runs/v3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,12 +290,16 @@ export function TimeFilter() {
290290 ) ;
291291}
292292
293- // Get initial custom duration state from a period string
293+ // Get initial custom duration state from a period string (only if it's not a preset)
294294function getInitialCustomDuration ( period ?: string ) : { value : string ; unit : string } {
295295 if ( period ) {
296- const parsed = parsePeriodString ( period ) ;
297- if ( parsed ) {
298- return { value : parsed . value . toString ( ) , unit : parsed . unit } ;
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+ }
299303 }
300304 }
301305 return { value : "" , unit : "m" } ;
You can’t perform that action at this time.
0 commit comments