Skip to content

Commit

Permalink
fix(material/list): make func private
Browse files Browse the repository at this point in the history
make func private

fixes b/291296866
  • Loading branch information
DBowen33 committed Sep 18, 2024
1 parent 9d6d88d commit 87c41f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/material/list/list-item-sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export class MatListItemLine implements AfterViewInit {
constructor(public _elementRef: ElementRef<HTMLElement>) {}

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(
Expand Down
2 changes: 0 additions & 2 deletions tools/public_api_guard/material/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ export class MatListItemIcon extends _MatListItemGraphicBase {
export class MatListItemLine implements AfterViewInit {
constructor(_elementRef: ElementRef<HTMLElement>);
// (undocumented)
addTitleToTruncatedText(): void;
// (undocumented)
_elementRef: ElementRef<HTMLElement>;
// (undocumented)
ngAfterViewInit(): void;
Expand Down

0 comments on commit 87c41f6

Please sign in to comment.