1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

[CL-569] Optionally allow item content to wrap (#13178)

This commit is contained in:
Vicki League
2025-01-31 13:42:41 -05:00
committed by GitHub
parent 22edfd4283
commit ca53ecccd0
4 changed files with 70 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import {
ChangeDetectionStrategy,
Component,
ElementRef,
Input,
signal,
ViewChild,
} from "@angular/core";
@@ -32,6 +33,13 @@ export class ItemContentComponent implements AfterContentChecked {
protected endSlotHasChildren = signal(false);
/**
* Determines whether text will truncate or wrap.
*
* Default behavior is truncation.
*/
@Input() truncate = true;
ngAfterContentChecked(): void {
this.endSlotHasChildren.set(this.endSlot?.nativeElement.childElementCount > 0);
}