Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: NavigationActions.popToTop no longer exists, belongs to StackAct…
Browse files Browse the repository at this point in the history
…ions now
  • Loading branch information
brentvatne authored and satya164 committed Aug 18, 2019
1 parent 7ebc1cf commit 273131f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bottom-tabs/src/utils/createTabNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from 'react';
import {
TabRouter,
NavigationActions,
StackActions,
createNavigator,
createNavigationContainer,
} from 'react-navigation';
Expand Down Expand Up @@ -85,7 +85,7 @@ export default function createTabNavigator(TabView: React.ComponentType<*>) {

if (isFocused) {
if (route.hasOwnProperty('index') && route.index > 0) {
navigation.dispatch(NavigationActions.popToTop({ key: route.key }));
navigation.dispatch(StackActions.popToTop({ key: route.key }));
} else {
// TODO: do something to scroll to top
}
Expand Down

0 comments on commit 273131f

Please sign in to comment.