File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ export class BottomNavigation extends TabNavigationBase {
452452 for ( let i = 0 ; i < fragments . length ; i ++ ) {
453453 this . removeFragment ( fragments [ i ] ) ;
454454 }
455+ this . _currentFragment = null ;
455456 this . fragments = [ ] ;
456457 }
457458 private attachFragment ( fragment : androidx . fragment . app . Fragment , id ?: number , name ?: string ) : void {
@@ -492,7 +493,7 @@ export class BottomNavigation extends TabNavigationBase {
492493 public changeTab ( index : number ) {
493494 // index is -1 when there are no items
494495 // bot nav is not attached if you change the tab too early
495- if ( index === - 1 || ! this . _attachedToWindow ) {
496+ if ( index === - 1 || ( this . _currentFragment && index === this . selectedIndex ) || ! this . _attachedToWindow ) {
496497 return ;
497498 }
498499
You can’t perform that action at this time.
0 commit comments