diff --git a/src/app/portal/components/results/publications2/publications2.component.ts b/src/app/portal/components/results/publications2/publications2.component.ts index 409964423..83de9bfcb 100644 --- a/src/app/portal/components/results/publications2/publications2.component.ts +++ b/src/app/portal/components/results/publications2/publications2.component.ts @@ -496,6 +496,9 @@ export class Publications2Component implements OnDestroy { delete queryParams[key]; } + const page = parseInt(queryParams.page?.[0] ?? "1"); + queryParams.page = [`${page - 1}`]; + this.router.navigate([], { relativeTo: this.route, // skipLocationChange: true, @@ -510,6 +513,9 @@ export class Publications2Component implements OnDestroy { queryParams[key] = [value]; + const page = parseInt(queryParams.page?.[0] ?? "1"); + queryParams.page = [`${page - 1}`]; + this.router.navigate([], { relativeTo: this.route, // skipLocationChange: true, @@ -521,8 +527,12 @@ export class Publications2Component implements OnDestroy { clearParam(key: string) { this.searchParams$.pipe(take(1)).subscribe(filterParams => { const queryParams = { ...filterParams }; + delete queryParams[key]; + const page = parseInt(queryParams.page?.[0] ?? "1"); + queryParams.page = [`${page - 1}`]; + this.router.navigate([], { relativeTo: this.route, // skipLocationChange: true,