Skip to content

Commit

Permalink
fix(results): go back to search form button fix (#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelez committed Nov 15, 2023
1 parent a176ce0 commit b2b18fe
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions apps/dsp-app/src/app/workspace/results/results.component.ts
Expand Up @@ -39,6 +39,8 @@ export class ResultsComponent {

splitSize: SplitSize;

projectUuid: string;

constructor(private _route: ActivatedRoute, private _titleService: Title) {
const parentParams$ = this._route.parent.paramMap;
const params$ = this._route.paramMap;
Expand Down Expand Up @@ -80,14 +82,7 @@ export class ResultsComponent {
}

private _handleParentParams(parentParams: Params) {
const uuid = parentParams.get('uuid');
if (uuid) {
this.searchParams = {
query: '',
mode: 'gravsearch'
};
this.searchParams.projectUuid = uuid;
}
this.projectUuid = parentParams.get('uuid');
}

private _handleSearchParams(params: Params) {
Expand All @@ -99,6 +94,10 @@ export class ResultsComponent {
mode: this.searchMode,
};

if(this.projectUuid) {
this.searchParams.projectUuid = this.projectUuid;
}

if (params.get('project') && this.searchMode === 'fulltext') {
this.searchParams.filter = {
limitToProject: decodeURIComponent(params.get('project')),
Expand Down

0 comments on commit b2b18fe

Please sign in to comment.