diff --git a/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.html index a9620412443..1a95d68b2cf 100644 --- a/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.html @@ -26,5 +26,6 @@ (submitSuggestion)="onSubmit($event)" (clickSuggestion)="onClick($event)" (findSuggestions)="findSuggestions($event)" + *ngIf="(isAvailableForShowSearchText | async) === false" ngDefaultControl> diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts index aedb5d3ee27..f09c4f18f48 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts @@ -104,6 +104,10 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy { */ isLastPage$: BehaviorSubject = new BehaviorSubject(false); + /** + * Emits true if show the search text + */ + isAvailableForShowSearchText: BehaviorSubject = new BehaviorSubject(false); /** * The value of the input field that is used to query for possible values for this filter */ @@ -289,6 +293,8 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy { getFirstSucceededRemoteDataPayload(), tap((facetValues: FacetValues) => { this.isLastPage$.next(hasNoValue(facetValues?.next)); + const hasLimitFacets = facetValues?.page?.length < facetValues?.facetLimit; + this.isAvailableForShowSearchText.next(hasLimitFacets && hasNoValue(facetValues?.next)); }), )), map((newFacetValues: FacetValues) => { diff --git a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.html index 7a6e1d816a0..51200571bd6 100644 --- a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.html @@ -26,6 +26,7 @@ (submitSuggestion)="onSubmit($event)" (clickSuggestion)="onClick($event)" (findSuggestions)="findSuggestions($event)" + *ngIf="(isAvailableForShowSearchText | async) === false" ngDefaultControl > diff --git a/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.html index 5723e540111..037964c63f3 100644 --- a/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.html @@ -26,5 +26,6 @@ (submitSuggestion)="onSubmit($event)" (clickSuggestion)="onClick($event)" (findSuggestions)="findSuggestions($event)" + *ngIf="(isAvailableForShowSearchText | async) === false" ngDefaultControl>