mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
feat: search url query param handling
This commit is contained in:
committed by
Rainer Killinger
parent
38f0a30076
commit
f349bd7233
@@ -277,6 +277,11 @@ export class SearchPageComponent implements OnInit, OnDestroy {
|
||||
* Search event of search bar
|
||||
*/
|
||||
searchStringChanged(queryValue: string) {
|
||||
this.router.navigate([], {
|
||||
relativeTo: this.route,
|
||||
queryParams: {query: queryValue},
|
||||
queryParamsHandling: 'merge',
|
||||
});
|
||||
this.queryTextChanged.next(queryValue);
|
||||
}
|
||||
|
||||
@@ -366,7 +371,7 @@ export class SearchPageComponent implements OnInit, OnDestroy {
|
||||
* Initialize
|
||||
*/
|
||||
async ionViewWillEnter() {
|
||||
const term = this.route.snapshot.paramMap.get('term') || undefined;
|
||||
const term = this.route.snapshot.queryParamMap.get('query') || undefined;
|
||||
if (term) {
|
||||
this.queryText = term;
|
||||
this.searchStringChanged(term);
|
||||
|
||||
Reference in New Issue
Block a user