RED-8647: added ellipsis for longer primary attributes values.

This commit is contained in:
Nicoleta Panaghiu 2024-03-11 14:20:42 +02:00
parent 64a1f1f41b
commit 8ca9de3c8d
3 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,7 @@
<b *ngIf="mode === 'workflow' && !isInEditMode"> {{ fileAttribute.label }}: </b>
<span
*ngIf="!isDate; else date"
[style.max-width]="attributeValueWidth"
[matTooltip]="fileAttributeValue"
[ngClass]="{ hide: isInEditMode, 'clamp-3': mode !== 'workflow' }"
>

View File

@ -28,6 +28,15 @@
display: flex;
align-items: center;
gap: 6px;
width: 90%;
span {
display: inline-block;
word-break: unset;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
mat-icon {
min-width: 12px;

View File

@ -70,6 +70,10 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
return this.width ? `${this.width * this.#widthFactor}px` : 'unset';
}
get attributeValueWidth(): string {
return this.width ? `${this.width * 0.9}px` : 'unset';
}
get isDate(): boolean {
return this.fileAttribute.type === FileAttributeConfigTypes.DATE;
}