diff --git a/projects/aca-content/src/lib/components/files/files.component.spec.ts b/projects/aca-content/src/lib/components/files/files.component.spec.ts index b7e5bd7498..167048c1ab 100644 --- a/projects/aca-content/src/lib/components/files/files.component.spec.ts +++ b/projects/aca-content/src/lib/components/files/files.component.spec.ts @@ -156,6 +156,14 @@ describe('FilesComponent', () => { expect(router.navigate['calls'].argsFor(0)[0]).toEqual(['/personal-files', 'parent-id']); }); + + it('should check isFilterHeaderActive to be true when filters are present in queryParamMap', () => { + Object.defineProperty(route, 'queryParamMap', { value: of({ params: { $thumbnail: 'TYPE:"cm:folder"' } }) }); + + fixture.detectChanges(); + + expect(component.isFilterHeaderActive).toBeTrue(); + }); }); describe('refresh on events', () => { diff --git a/projects/aca-content/src/lib/components/files/files.component.ts b/projects/aca-content/src/lib/components/files/files.component.ts index 41b68ac25f..e4245ce93d 100644 --- a/projects/aca-content/src/lib/components/files/files.component.ts +++ b/projects/aca-content/src/lib/components/files/files.component.ts @@ -95,7 +95,6 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { this.route.queryParamMap.subscribe((queryMap: Params) => { this.queryParams = queryMap.params; }); - this.route.params.subscribe(({ folderId }: Params) => { const nodeId = folderId || data.defaultNodeId; @@ -129,6 +128,9 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { }); this.columns = this.extensions.documentListPresets.files || []; + if (this.queryParams && Object.keys(this.queryParams).length > 0) { + this.isFilterHeaderActive = true; + } } ngOnDestroy() {