diff --git a/.changeset/thin-apricots-hunt.md b/.changeset/thin-apricots-hunt.md new file mode 100644 index 00000000..063a3c87 --- /dev/null +++ b/.changeset/thin-apricots-hunt.md @@ -0,0 +1,5 @@ +--- +"@hyperdx/app": patch +--- + +bug fixes with relative time selection diff --git a/packages/app/src/DBSearchPage.tsx b/packages/app/src/DBSearchPage.tsx index 5fe5720f..e179d440 100644 --- a/packages/app/src/DBSearchPage.tsx +++ b/packages/app/src/DBSearchPage.tsx @@ -1030,7 +1030,7 @@ function DBSearchPage() { } // we only want this to run on initial mount // eslint-disable-next-line react-hooks/exhaustive-deps - }, [updateRelativeTimeInputValue, isReady]); + }, [updateRelativeTimeInputValue, searchedConfig.source, isReady]); useLiveUpdate({ isLive, diff --git a/packages/app/src/timeQuery.ts b/packages/app/src/timeQuery.ts index 899b6edc..8e7b2f2f 100644 --- a/packages/app/src/timeQuery.ts +++ b/packages/app/src/timeQuery.ts @@ -479,7 +479,11 @@ export function useNewTimeQuery({ setSearchedTimeRange(initialTimeRange); const dateRangeStr = dateRangeToString(initialTimeRange, isUTC); if (updateInput !== false) { - _setDisplayedTimeInputValue(initialDisplayValue ?? dateRangeStr); + if (!showRelativeInterval) { + _setDisplayedTimeInputValue(dateRangeStr); + } else { + _setDisplayedTimeInputValue(initialDisplayValue ?? dateRangeStr); + } } } }, [