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 {
452
452
for ( let i = 0 ; i < fragments . length ; i ++ ) {
453
453
this . removeFragment ( fragments [ i ] ) ;
454
454
}
455
+ this . _currentFragment = null ;
455
456
this . fragments = [ ] ;
456
457
}
457
458
private attachFragment ( fragment : androidx . fragment . app . Fragment , id ?: number , name ?: string ) : void {
@@ -492,7 +493,7 @@ export class BottomNavigation extends TabNavigationBase {
492
493
public changeTab ( index : number ) {
493
494
// index is -1 when there are no items
494
495
// 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 ) {
496
497
return ;
497
498
}
498
499
You can’t perform that action at this time.
0 commit comments