Skip to content

Commit

Permalink
Add missing sessionid update (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos authored Dec 11, 2024
1 parent 3e818e5 commit 9e65401
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,25 @@ export const useUnifiedSearch = () => {
const onFiltersChange = useCallback(
(filters: Filter[]) => {
setSearch({ type: 'SET_FILTERS', filters });
updateSearchSessionId();
},
[setSearch]
[setSearch, updateSearchSessionId]
);

const onPanelFiltersChange = useCallback(
(panelFilters: Filter[]) => {
setSearch({ type: 'SET_PANEL_FILTERS', panelFilters });
updateSearchSessionId();
},
[setSearch]
[setSearch, updateSearchSessionId]
);

const onLimitChange = useCallback(
(limit: number) => {
setSearch({ type: 'SET_LIMIT', limit });
updateSearchSessionId();
},
[setSearch]
[setSearch, updateSearchSessionId]
);

const onDateRangeChange = useCallback(
Expand All @@ -104,11 +107,12 @@ export const useUnifiedSearch = () => {
setError(null);
validateQuery(query);
setSearch({ type: 'SET_QUERY', query });
updateSearchSessionId();
} catch (err) {
setError(err);
}
},
[validateQuery, setSearch]
[validateQuery, setSearch, updateSearchSessionId]
);

const onSubmit = useCallback(
Expand Down

0 comments on commit 9e65401

Please sign in to comment.