Browse Source

Fix cut off text in dropdown.

pull/397/head
Sebastian Stehle 6 years ago
parent
commit
39ba50ef44
  1. 3
      src/Squidex/app/features/content/shared/references-dropdown.component.ts
  2. 2
      src/Squidex/app/framework/angular/forms/dropdown.component.html
  3. 5
      src/Squidex/app/framework/angular/forms/dropdown.component.scss

3
src/Squidex/app/features/content/shared/references-dropdown.component.ts

@ -46,6 +46,9 @@ type ContentName = { name: string, id?: string };
<span class="truncate" [innerHTML]="content.name | sqxHighlight:context"></span>
</ng-template>
</sqx-dropdown>`,
styles: [
'.truncate { min-height: 1.2rem; }'
],
providers: [SQX_REFERENCES_DROPDOWN_CONTROL_VALUE_ACCESSOR],
changeDetection: ChangeDetectionStrategy.OnPush
})

2
src/Squidex/app/framework/angular/forms/dropdown.component.html

@ -6,7 +6,7 @@
autocapitalize="off">
<div class="control-dropdown-item" *ngIf="snapshot.selectedItem">
<ng-container *ngIf="!templateSelection">{{snapshot.selectedItem}}</ng-container>
<span class="truncate" *ngIf="!templateSelection">{{snapshot.selectedItem}}</span>
<ng-template *ngIf="templateSelection" [sqxTemplateWrapper]="templateSelection" [item]="snapshot.selectedItem"></ng-template>
</div>

5
src/Squidex/app/framework/angular/forms/dropdown.component.scss

@ -40,6 +40,7 @@ $color-input-disabled: #eef1f4;
.control-dropdown-item {
@include absolute(0, 1rem, 0, 0);
padding-bottom: 0;
pointer-events: none;
position: absolute;
line-height: 1.2rem;
@ -52,6 +53,10 @@ $color-input-disabled: #eef1f4;
pointer-events: none;
}
.truncate {
min-height: 1.2rem;
}
.form-control {
cursor: default;
}

Loading…
Cancel
Save