fixed merging issues
This commit is contained in:
@@ -46,7 +46,7 @@ export class AppSearchbarComponent {
|
||||
|
||||
constructor() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const currentSearch = params.get('search') ?? '';
|
||||
const currentSearch = params.get('query') ?? '';
|
||||
this.searchControl.setValue(currentSearch, { emitEvent: false });
|
||||
|
||||
// Autocomplete suggestions
|
||||
@@ -100,7 +100,7 @@ export class AppSearchbarComponent {
|
||||
this.router.url.startsWith('/persons') ? [] : ['/persons'],
|
||||
{
|
||||
relativeTo: this.route,
|
||||
queryParams: { search: search || null, page: 0 },
|
||||
queryParams: { query: search || null, page: 1 },
|
||||
queryParamsHandling: 'merge',
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user