Skip to content

Commit 3e446ab

Browse files
committed
feat(material/tabs): Responded to PR feedback
1 parent 3989c1c commit 3e446ab

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/material-experimental/mdc-tabs/tab-nav-bar/tab-nav-bar.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ export class MatTabNav extends _MatTabNavBase implements AfterContentInit {
142142
},
143143
})
144144
export class MatTabLink extends _MatTabLinkBase implements MatInkBarItem, OnInit, OnDestroy {
145-
/** Unique id for the tab. */
146-
@Input() override id = `mat-mdc-tab-link-${nextUniqueId++}`;
147-
148145
_foundation = new MatInkBarFoundation(this.elementRef.nativeElement, this._document);
149146

150147
private readonly _destroyed = new Subject<void>();
@@ -198,7 +195,7 @@ let nextUniqueId = 0;
198195
})
199196
export class MatTabNavPanel {
200197
/** Unique id for the tab panel. */
201-
@Input() id = `mat-mdc-tab-nav-panel-${nextUniqueId++}`;
198+
@Input() id = `mat-tab-nav-panel-${nextUniqueId++}`;
202199

203200
/** Id of the active tab in the nav bar. */
204201
_activeTabId?: string;

src/material/tabs/tab-nav-bar/tab-nav-bar.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ export class _MatTabLinkBase
259259
);
260260
}
261261

262-
/** Unique id for the tab. Provided by the sub-class. */
263-
id: string;
262+
/** Unique id for the tab. */
263+
@Input() id = `mat-tab-link-${nextUniqueId++}`;
264264

265265
constructor(
266266
private _tabNavBar: _MatTabNavBase,
@@ -359,9 +359,6 @@ export class _MatTabLinkBase
359359
},
360360
})
361361
export class MatTabLink extends _MatTabLinkBase implements OnDestroy {
362-
/** Unique id for the tab. */
363-
@Input() override id = `mat-tab-link-${nextUniqueId++}`;
364-
365362
/** Reference to the RippleRenderer for the tab-link. */
366363
private _tabLinkRipple: RippleRenderer;
367364

0 commit comments

Comments
 (0)