[Library | explore-redesign]: Hide numbers of entity tabs on mobile screens | Bug fix in search filters.

1. searchFilter.component.ts: [Bug fix] In method "filterKeywords()", set hasMatch and call detectChanges(), only if !hasMatch.
2. searchAll.component.html: Hide numbers of entity tabs on mobile screens.
This commit is contained in:
Konstantina Galouni 2023-05-16 14:29:31 +03:00
parent bda90f2c38
commit 2d0f29d040
2 changed files with 9 additions and 7 deletions

View File

@ -39,7 +39,7 @@
<li [class.uk-active]="activeEntity == 'result'">
<a class="uk-text-uppercase">
{{resultsName}}
<span *ngIf=" fetchPublications.searchUtils.totalResults!=null">
<span *ngIf=" fetchPublications.searchUtils.totalResults!=null" class="uk-visible@m">
({{fetchPublications.searchUtils.totalResults | number}})</span>
</a>
</li>
@ -50,7 +50,7 @@
<li [class.uk-active]="activeEntity == 'projects'">
<a class="uk-text-uppercase">
{{projectName}}
<span *ngIf="fetchProjects.searchUtils.totalResults!=null">
<span *ngIf="fetchProjects.searchUtils.totalResults!=null" class="uk-visible@m">
({{fetchProjects.searchUtils.totalResults | number}})</span>
</a>
</li>
@ -61,7 +61,7 @@
<li [class.uk-active]="activeEntity == 'datasources'">
<a class="uk-text-uppercase">
{{dataSourcesName}}
<span *ngIf="fetchDataproviders.searchUtils.totalResults!=null">
<span *ngIf="fetchDataproviders.searchUtils.totalResults!=null" class="uk-visible@m">
({{fetchDataproviders.searchUtils.totalResults | number}})</span>
</a>
</li>
@ -72,7 +72,7 @@
<li [class.uk-active]="activeEntity == 'services'">
<a class="uk-text-uppercase">
{{servicesName}}
<span *ngIf="fetchServices.searchUtils.totalResults!=null">
<span *ngIf="fetchServices.searchUtils.totalResults!=null" class="uk-visible@m">
({{fetchServices.searchUtils.totalResults | number}})</span>
</a>
</li>
@ -83,7 +83,7 @@
<li [class.uk-active]="activeEntity == 'organizations'">
<a class="uk-text-uppercase">
{{organizationsName}}
<span *ngIf="fetchOrganizations.searchUtils.totalResults!=null">
<span *ngIf="fetchOrganizations.searchUtils.totalResults!=null" class="uk-visible@m">
({{fetchOrganizations.searchUtils.totalResults | number}})</span>
</a>
</li>

View File

@ -120,8 +120,10 @@ export class SearchFilterComponent implements OnInit, OnChanges {
return false;
}
}
this.hasMatch = true;
this.cdr.detectChanges();
if(!this.hasMatch) {
this.hasMatch = true;
this.cdr.detectChanges();
}
return true;
}