Skip to content

Commit bacefac

Browse files
authored
fix: Fix session page source change on submit (#1380)
Closes HDX-2858 # Summary This PR fixes a bug on the sessions page which caused any search submission to revert the source select back to its default. The cause of this bug was that the form submission was updating the wrong URL query parameter (source instead of sessionSource), and form submission would trigger the select to take whatever (original) value was set for sessionSource).
1 parent d322cd9 commit bacefac

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/heavy-walls-suffer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
fix: Fix session page source change on submit

packages/app/src/SessionsPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ export default function SessionsPage() {
296296
const onSubmit = useCallback(() => {
297297
onSearch(displayedTimeInputValue);
298298
handleSubmit(values => {
299-
setAppliedConfig(values);
299+
const { source, ...rest } = values;
300+
setAppliedConfig({ sessionSource: source, ...rest });
300301
})();
301302
}, [handleSubmit, setAppliedConfig, onSearch, displayedTimeInputValue]);
302303

0 commit comments

Comments
 (0)