forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
108595: fix for overflowing search filter badge selection
- Loading branch information
1 parent
e4f483c
commit f4dc8ca
Showing
6 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
8 changes: 5 additions & 3 deletions
8
src/app/shared/search/search-labels/search-label/search-label.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<a class="badge badge-primary mr-1 mb-1 text-capitalize" | ||
<a class="badge badge-primary mb-1 text-capitalize" | ||
[routerLink]="searchLink" | ||
[queryParams]="(removeParameters | async)" queryParamsHandling="merge"> | ||
{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} | ||
<span> ×</span> | ||
<span class="d-flex"> | ||
<span class="flex-grow-1 text-left">{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}</span> | ||
<span class="pl-1">×</span> | ||
</span> | ||
</a> |
3 changes: 3 additions & 0 deletions
3
src/app/shared/search/search-labels/search-label/search-label.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.badge { | ||
white-space: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/app/shared/search/search-labels/search-labels.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="labels"> | ||
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys)"> | ||
<ds-search-label *ngFor="let value of (appliedFilters | async)[key]" [inPlaceSearch]="inPlaceSearch" [key]="key" [value]="value" [appliedFilters]="appliedFilters"></ds-search-label> | ||
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys); let lastType = last"> | ||
<ds-search-label *ngFor="let value of (appliedFilters | async)[key]; let lastOfType = last" [inPlaceSearch]="inPlaceSearch" [key]="key" [value]="value" [appliedFilters]="appliedFilters"></ds-search-label> | ||
</ng-container> | ||
</div> |
9 changes: 8 additions & 1 deletion
9
src/app/shared/search/search-labels/search-labels.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
:host { | ||
line-height: 1; | ||
} | ||
.labels { | ||
margin: 0 calc(-1 * var(--bs-spacer)/8); | ||
ds-search-label { | ||
display: inline-block; | ||
padding: 0 calc(var(--bs-spacer)/8); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters