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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user