Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the filter removes the division query from the url #934

Closed
laingsimon opened this issue Jun 26, 2024 · 1 comment · Fixed by #935
Closed

Changing the filter removes the division query from the url #934

laingsimon opened this issue Jun 26, 2024 · 1 comment · Fixed by #935
Labels
bug Something isn't working
Milestone

Comments

@laingsimon laingsimon added the bug Something isn't working label Jun 26, 2024
@laingsimon laingsimon added this to the v2.1.4 milestone Jun 26, 2024
@laingsimon
Copy link
Owner Author

laingsimon commented Jun 26, 2024

Issue stems from:

export function changeFilter(newFilter: IInitialisedFilters, setFilter: (filter: IInitialisedFilters) => any, navigate: Function, location: { pathname: string, hash: string }) {

A fix could be to

- const search: IInitialisedFilters = Object.assign({}, newFilter);
+ const search: IInitialisedFilters = Object.assign({}, new URLSearchParams(location.search), newFilter);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant