diff --git a/src/material/list/list-item-sections.ts b/src/material/list/list-item-sections.ts index a4de565bda55..36cf7c0d12e3 100644 --- a/src/material/list/list-item-sections.ts +++ b/src/material/list/list-item-sections.ts @@ -39,12 +39,12 @@ export class MatListItemLine implements AfterViewInit { constructor(public _elementRef: ElementRef) {} ngAfterViewInit() { - this.addTitleToTruncatedText(); + this._addTitleToTruncatedText(); } // In case text overflow is triggered and ellipsis is applied, adds role='tooltip' and title // attribute to container so visual users can see the full text on hover - addTitleToTruncatedText() { + private _addTitleToTruncatedText() { if (this._elementRef.nativeElement.offsetWidth < this._elementRef.nativeElement.scrollWidth) { this._elementRef.nativeElement.setAttribute('role', 'tooltip'); this._elementRef.nativeElement.setAttribute( diff --git a/tools/public_api_guard/material/list.md b/tools/public_api_guard/material/list.md index 127509179ed1..f4bdf47387c1 100644 --- a/tools/public_api_guard/material/list.md +++ b/tools/public_api_guard/material/list.md @@ -123,8 +123,6 @@ export class MatListItemIcon extends _MatListItemGraphicBase { export class MatListItemLine implements AfterViewInit { constructor(_elementRef: ElementRef); // (undocumented) - addTitleToTruncatedText(): void; - // (undocumented) _elementRef: ElementRef; // (undocumented) ngAfterViewInit(): void;