Skip to content

Commit

Permalink
🐛 go to first page after submit search
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-escire committed Aug 25, 2023
1 parent da13913 commit 88a7088
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 88a7088

Please sign in to comment.