diff --git a/src/app/shared/search/search-filters/search-filters.component.html b/src/app/shared/search/search-filters/search-filters.component.html index 2909d31766e..d8762ed0331 100644 --- a/src/app/shared/search/search-filters/search-filters.component.html +++ b/src/app/shared/search/search-filters/search-filters.component.html @@ -1,4 +1,4 @@ -
+

{{"search.filters.head" | translate}}

diff --git a/src/app/shared/search/search-filters/search-filters.component.spec.ts b/src/app/shared/search/search-filters/search-filters.component.spec.ts index 247df67ee53..c3a876c661b 100644 --- a/src/app/shared/search/search-filters/search-filters.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filters.component.spec.ts @@ -76,7 +76,7 @@ describe('SearchFiltersComponent', () => { it('should not render component', () => { const menu = fixture.debugElement.query(By.css('div.d-none')); expect(menu).not.toBeNull(); - expect(comp.availableFilters).toBeFalse(); + expect(comp.searchFilterCount).toEqual(0); }); }); diff --git a/src/app/shared/search/search-filters/search-filters.component.ts b/src/app/shared/search/search-filters/search-filters.component.ts index c20a7e37d0f..bdd9729c4d0 100644 --- a/src/app/shared/search/search-filters/search-filters.component.ts +++ b/src/app/shared/search/search-filters/search-filters.component.ts @@ -63,7 +63,7 @@ export class SearchFiltersComponent implements OnInit, AfterViewChecked, OnDestr /** * counts for the active filters */ - availableFilters = false; + searchFilterCount = 0; /** * Link to the search page @@ -112,9 +112,11 @@ export class SearchFiltersComponent implements OnInit, AfterViewChecked, OnDestr } ngAfterViewChecked() { - this.availableFilters = false; + this.searchFilterCount = 0; this.searchFilter._results.forEach(element => { - this.availableFilters = element.nativeElement?.children[0]?.children.length > 0; + if (element.nativeElement?.children[0]?.children.length > 0) { + this.searchFilterCount++; + } }); }