mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix issue where select box does not update when changing saved searches. (#1537)
Reproduction: 1. create a saved search with a custom select ex. Timestamp, Body 2. go to another saved search with a default select (or anywhere with a default select) 3. go back to initial saved search with custom select Before: observe the SELECT statement is now the default select statement After: observe that the SELECT statement is now updated as expected Fixes HDX-3127
This commit is contained in:
parent
e78960f3bb
commit
11bd8e3df8
2 changed files with 11 additions and 1 deletions
5
.changeset/stale-suits-cover.md
Normal file
5
.changeset/stale-suits-cover.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
Fix issue where select is not updating when loading saved searches
|
||||
|
|
@ -1003,7 +1003,12 @@ function DBSearchPage() {
|
|||
onFilterChange: handleSetFilters,
|
||||
});
|
||||
|
||||
const watchedSource = useWatch({ control, name: 'source' });
|
||||
const watchedSource = useWatch({
|
||||
control,
|
||||
name: 'source',
|
||||
// Watch will reset when changing saved search, so we need to default to the URL
|
||||
defaultValue: searchedConfig.source ?? undefined,
|
||||
});
|
||||
const prevSourceRef = useRef(watchedSource);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue