From 3dde12383af5c3f3997fc0471b8eccb1f9ead14a Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 28 Oct 2020 11:41:11 +0100 Subject: [PATCH] FEAT #15292 TIME 0:20 fix css --- .../plugins/select-search/select-search.component.html | 2 +- .../plugins/select-search/select-search.component.scss | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/plugins/select-search/select-search.component.html b/src/frontend/plugins/select-search/select-search.component.html index 3943ad0959b..b58e43e9876 100644 --- a/src/frontend/plugins/select-search/select-search.component.html +++ b/src/frontend/plugins/select-search/select-search.component.html @@ -30,7 +30,7 @@ <mat-option *ngIf="showResetOption" (onSelectionChange)="selectChange($event)" [value]="emptyData()">({{'lang.emptyValue' | translate}})</mat-option> <mat-option *ngFor="let value of filteredDatas | async" (onSelectionChange)="selectChange($event)" [value]="returnValue === 'id' ? value.id : value" [title]="value.title !== undefined ? value.title : value.label" [disabled]="value.disabled" - [class.opt-group]="value.isTitle" [style.color]="value.color"> + [class.opt-group]="value.isTitle" [class.fixPos]="value.isTitle && datas.length > 5" [style.color]="value.color"> <span [innerHTML]="value.label"></span> </mat-option> </mat-select> diff --git a/src/frontend/plugins/select-search/select-search.component.scss b/src/frontend/plugins/select-search/select-search.component.scss index 61f4bf62201..f4e8b777fb5 100644 --- a/src/frontend/plugins/select-search/select-search.component.scss +++ b/src/frontend/plugins/select-search/select-search.component.scss @@ -73,7 +73,7 @@ $multiple-check-width: 33px; .opt-group { position: sticky; - top: 50px; + top: 0px; background: white; z-index: 1; ::ng-deep.mat-pseudo-checkbox { @@ -81,6 +81,10 @@ $multiple-check-width: 33px; } } +.fixPos { + top: 50px !important; +} + .multipleLabels { color: $secondary; } \ No newline at end of file -- GitLab