@@ -81,8 +81,6 @@ export class TabBase extends BaseElement {
8181 * onTransitionEnd (needed?)
8282 */
8383
84- @query ( 'mwc-tab-indicator' ) private _tabIndicator ! : HTMLElement ;
85-
8684 @query ( '.mdc-tab__content' ) private _contentElement ! : HTMLElement ;
8785
8886 private _handleClick ( ) {
@@ -159,11 +157,14 @@ export class TabBase extends BaseElement {
159157 ...addHasRemoveClass ( this . mdcRoot ) ,
160158 setAttr : ( attr : string , value : string ) =>
161159 this . mdcRoot . setAttribute ( attr , value ) ,
162- activateIndicator : ( previousIndicatorClientRect : ClientRect ) =>
163- ( this . _tabIndicator as TabIndicator )
164- . activate ( previousIndicatorClientRect ) ,
165- deactivateIndicator : ( ) =>
166- ( this . _tabIndicator as TabIndicator ) . deactivate ( ) ,
160+ activateIndicator : async ( previousIndicatorClientRect : ClientRect ) => {
161+ await this . tabIndicator . updateComplete ;
162+ this . tabIndicator . activate ( previousIndicatorClientRect ) ;
163+ } ,
164+ deactivateIndicator : async ( ) => {
165+ await this . tabIndicator . updateComplete ;
166+ this . tabIndicator . deactivate ( ) ;
167+ } ,
167168 notifyInteracted : ( ) =>
168169 this . dispatchEvent ( new CustomEvent < TabInteractionEventDetail > (
169170 MDCTabFoundation . strings . INTERACTED_EVENT , {
0 commit comments