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).
This commit is contained in:
Drew Davis 2025-11-19 09:09:31 -05:00 committed by GitHub
parent d322cd967d
commit bacefac9e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---
fix: Fix session page source change on submit

View file

@ -296,7 +296,8 @@ export default function SessionsPage() {
const onSubmit = useCallback(() => {
onSearch(displayedTimeInputValue);
handleSubmit(values => {
setAppliedConfig(values);
const { source, ...rest } = values;
setAppliedConfig({ sessionSource: source, ...rest });
})();
}, [handleSubmit, setAppliedConfig, onSearch, displayedTimeInputValue]);