Skip to content

Commit

Permalink
🐛 go to first page after submit search
Browse files Browse the repository at this point in the history
(cherry picked from commit 88a7088)
  • Loading branch information
hugo-escire authored and Zahraa Chreim committed Apr 24, 2024
1 parent 404ccd9 commit c311e9e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/shared/search-form/search-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ export class SearchFormComponent implements OnChanges {
* @param data Updated parameters
*/
updateSearch(data: any) {
const queryParams = Object.assign({}, data);
const goToFirstPage = { 'spc.page': 1 };

const queryParams = Object.assign(
{
...goToFirstPage
},
data
);

void this.router.navigate(this.getSearchLinkParts(), {
queryParams: queryParams,
Expand Down

0 comments on commit c311e9e

Please sign in to comment.