mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix state issues with relative time input not matching reality (#1320)
Fix issues where input state became out of sync in certain edge cases with relative time **Before** (Demo Video): https://github.com/user-attachments/assets/5f7b92f1-1dcd-413d-bca1-092d4e4bc360 **After**: issues are not observed.
This commit is contained in:
parent
43dfb3aaff
commit
24bf2b419d
3 changed files with 11 additions and 2 deletions
5
.changeset/thin-apricots-hunt.md
Normal file
5
.changeset/thin-apricots-hunt.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
bug fixes with relative time selection
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [
|
||||
|
|
|
|||
Loading…
Reference in a new issue