Closed
Description
Issue Description
Hide tabs on push only works on the initial tab. I added a second "Hide Tabs on Push" button to the playground app to reproduce it.
Steps to Reproduce / Code Snippets / Screenshots
I think a gif describes it the best.
Environment
- React Native Navigation version: 6.7.1
- React Native version: 0.61.5
- Platform(s) (iOS, Android, or both?): iOS
- Device info (Simulator/Device? OS version? Debug/Release?): iOS 13.5 - iPhone 11 - debug, but I think the bug also occurs in release
I changed this:
diff --git a/playground/src/screens/SecondBottomTabScreen.js b/playground/src/screens/SecondBottomTabScreen.js
index a65a031e7cb880c93334f60919111b0b4ebd244c..1b45f1c79566b790c082708dec8e7fb190b493ae 100644
--- a/playground/src/screens/SecondBottomTabScreen.js
+++ b/playground/src/screens/SecondBottomTabScreen.js
@@ -9,6 +9,7 @@ const {
PUSH_BTN,
PUSHED_BOTTOM_TABS,
SIDE_MENU_TAB,
+ HIDE_TABS_PUSH_BTN,
FLAT_LIST_BTN
} = require('../testIDs')
@@ -37,10 +38,16 @@ class SecondBottomTabScreen extends React.Component {
<Button label='Push' onPress={this.push} />
<Button label='Push BottomTabs' testID={PUSH_BTN} onPress={this.pushBottomTabs} />
<Button label='SideMenu inside BottomTabs' testID={SIDE_MENU_INSIDE_BOTTOM_TABS_BTN} onPress={this.sideMenuInsideBottomTabs} />
+ <Button label='Hide Tabs on Push' testID={HIDE_TABS_PUSH_BTN} onPress={this.hideTabsOnPush} />
</Root>
);
}
+
+ hideTabsOnPush = () => Navigation.push(this, component(Screens.Pushed, {
+ bottomTabs: { visible: false }
+ }));
+
push = () => Navigation.push(this, Screens.Pushed);
pushBottomTabs = () => Navigation.push(this, {
Metadata
Assignees
Labels
No labels