Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export function useUrlSearchState(): {
const sub = urlStateStorage.current
?.change$<SearchState>(SLO_LIST_SEARCH_URL_STORAGE_KEY)
.subscribe((newSearchState) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty/cleared search state resets to DEFAULT_STATE.

if (newSearchState) {
setState(newSearchState);
}
// When URL has no search params, newSearchState will be null/undefined
// In that case, reset to DEFAULT_STATE
setState(newSearchState ?? DEFAULT_STATE);
});

setState(
Expand All @@ -89,7 +89,7 @@ export function useUrlSearchState(): {
setState(() => updatedState);

urlStateStorage.current?.set(SLO_LIST_SEARCH_URL_STORAGE_KEY, updatedState, {
replace: true,
replace: false,
Copy link
Contributor Author

@mgiota mgiota Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace: false creates a new browser history entry. Previously changes used replace, which blocked back/forward navigation

TODO: completely remove, since replace:false is the default value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in this commit

});

// Discard search itself from session storage. Keep only view preferences
Expand Down