Skip to content
Snippets Groups Projects
Commit 89ab06ff authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

fix(orientation): old filters must not be kept when changing orientation filters

parent 015b96ca
Branches
Tags
2 merge requests!542V2.3.1,!532Resolve "[orientation] - mauvais filtres - Regression"
......@@ -109,8 +109,13 @@ export class StructureListSearchComponent implements OnInit {
//Update url with new params added or removed
public updateUrlParams(filters: Filter[]): void {
// No url update if the page is displaying structure details, because it must keep the url with the structure id
if (this.activatedRoute.snapshot.queryParams['id'] && filters.length === 0) return;
// No url update if the page is displaying structure details, because it must keep the url with the structure id, neither for orientation
if (
(this.activatedRoute.snapshot.queryParams['id'] && filters.length === 0) ||
this.router.url.startsWith('/orientation')
) {
return;
}
let queryString = [];
filters.forEach((elt) => {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment