Skip to content
Snippets Groups Projects
Commit 010edb5a authored by ext.sopra.ncastejon's avatar ext.sopra.ncastejon
Browse files

Fix routing when query search changed.

parent 165aa8d1
Branches
No related tags found
1 merge request!73Development
Pipeline #5246 passed
......@@ -463,8 +463,12 @@ export class DatasetResearchService {
this._elasticsearchOptions.searchString = value;
this._elasticsearchOptions.pageIndex = 0;
this._elasticsearchOptions.shouldAggregateResultCount = true;
if (!this._router.url.split('/').pop().startsWith(AppRoutes.research.uri)) {
this._router.navigate(['/', `${AppRoutes.research.uri}?q=${value}`]);
if (this._router.url.split('/').pop() !== AppRoutes.research.uri) {
if (value === '') {
this._router.navigate(['/', `${AppRoutes.research.uri}`]);
} else {
this._router.navigate(['/', `${AppRoutes.research.uri}`], { queryParams: { q: value } });
}
}
this._researchUrlService.setParameter('q', value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment