Skip to content

Commit f4dc8ca

Browse files
committed
108595: fix for overflowing search filter badge selection
1 parent e4f483c commit f4dc8ca

6 files changed

Lines changed: 21 additions & 8 deletions

File tree

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
<a class="badge badge-primary mr-1 mb-1 text-capitalize"
1+
<a class="badge badge-primary mb-1 text-capitalize"
22
[routerLink]="searchLink"
33
[queryParams]="(removeParameters | async)" queryParamsHandling="merge">
4-
{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}
5-
<span> ×</span>
4+
<span class="d-flex">
5+
<span class="flex-grow-1 text-left">{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}</span>
6+
<span class="pl-1">×</span>
7+
</span>
68
</a>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.badge {
2+
white-space: inherit;
3+
}

src/app/shared/search/search-labels/search-label/search-label.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc
1111
@Component({
1212
selector: 'ds-search-label',
1313
templateUrl: './search-label.component.html',
14+
styleUrls: ['./search-label.component.scss'] ,
1415
})
1516

1617
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="labels">
2-
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys)">
3-
<ds-search-label *ngFor="let value of (appliedFilters | async)[key]" [inPlaceSearch]="inPlaceSearch" [key]="key" [value]="value" [appliedFilters]="appliedFilters"></ds-search-label>
2+
<ng-container *ngFor="let key of ((appliedFilters | async) | dsObjectKeys); let lastType = last">
3+
<ds-search-label *ngFor="let value of (appliedFilters | async)[key]; let lastOfType = last" [inPlaceSearch]="inPlaceSearch" [key]="key" [value]="value" [appliedFilters]="appliedFilters"></ds-search-label>
44
</ng-container>
55
</div>
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
:host {
22
line-height: 1;
3-
}
3+
.labels {
4+
margin: 0 calc(-1 * var(--bs-spacer)/8);
5+
ds-search-label {
6+
display: inline-block;
7+
padding: 0 calc(var(--bs-spacer)/8);
8+
}
9+
}
10+
}

src/app/shared/search/search.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
[inPlaceSearch]="inPlaceSearch"
8383
[searchPlaceholder]="searchFormPlaceholder | translate">
8484
</ds-search-form>
85-
<div class="row mb-3 mb-md-1">
86-
<div class="labels col-sm-9">
85+
<div class="mb-3 mb-md-1">
86+
<div class="labels">
8787
<ds-search-labels *ngIf="searchEnabled" [inPlaceSearch]="inPlaceSearch"></ds-search-labels>
8888
</div>
8989
</div>

0 commit comments

Comments
 (0)