From 1cedbcf3ba7a95293fd60d447521ae6fcba12f8d Mon Sep 17 00:00:00 2001 From: Sean Morton Date: Tue, 31 Jul 2018 21:47:00 -0700 Subject: [PATCH] Don't use a reset sub-action for drawer items --- packages/drawer/src/views/DrawerSidebar.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/drawer/src/views/DrawerSidebar.js b/packages/drawer/src/views/DrawerSidebar.js index 05d0a1b0..56943614 100644 --- a/packages/drawer/src/views/DrawerSidebar.js +++ b/packages/drawer/src/views/DrawerSidebar.js @@ -45,24 +45,8 @@ class DrawerSidebar extends React.PureComponent { _onItemPress = ({ route, focused }) => { if (!focused) { - let subAction; - // TODO (v3): Revisit and repeal this behavior: - // if the child screen is a StackRouter then always navigate to its first screen (see #1914) - if (route.index != null && route.index !== 0) { - subAction = StackActions.reset({ - index: 0, - actions: [ - NavigationActions.navigate({ - routeName: route.routes[0].routeName, - }), - ], - }); - } this.props.navigation.dispatch( - NavigationActions.navigate({ - routeName: route.routeName, - action: subAction, - }) + NavigationActions.navigate({ routeName: route.routeName }) ); } };