Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 457e337

Browse files
authored
fix(tab-bar): Force change detection on activeTabIndex (#1783)
1 parent 918f469 commit 457e337

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/tab-bar/tab-bar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
AfterContentInit,
3+
ChangeDetectorRef,
34
ChangeDetectionStrategy,
45
Component,
56
ContentChild,
@@ -180,6 +181,7 @@ export class MdcTabBar implements AfterContentInit, OnDestroy {
180181

181182
constructor(
182183
private _platform: Platform,
184+
private _changeDetectorRef: ChangeDetectorRef,
183185
public elementRef: ElementRef<HTMLElement>) { }
184186

185187
ngAfterContentInit(): void {
@@ -254,6 +256,7 @@ export class MdcTabBar implements AfterContentInit, OnDestroy {
254256
if (this._platform.isBrowser) {
255257
this._foundation.activateTab(index);
256258
}
259+
this._changeDetectorRef.markForCheck();
257260
}
258261

259262
/** Scrolls the tab at the given index into view */

0 commit comments

Comments
 (0)