wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

bottomTabs navigation not able to hide #7723

Closed PrudhviBanki closed 1 year ago

PrudhviBanki commented 1 year ago

What happened?

bottomTabs: { titleDisplayMode: 'alwaysShow', visible :false, },

not working in iOS RN :0.71 RNN :Latest one

My code snap

const setUpBottomTabsView = async (tabIndex = 0) => {

  console.log("index::",tabIndex)
  Navigation.setDefaultOptions({
    layout :{
      backgroundColor: 'transparent',
    },
    animations: {
      setRoot: {
        waitForRender: true
      },
      showModal: {
        waitForRender: true
      },
      push: {
        waitForRender: true
      }
    },
    navigationBar:{
      backgroundColor :colors.white,
      color :colors.white
    },
     statusBar: {
       style: 'light',
       backgroundColor :colors.baseColor
     },
     layout: {
       orientation: ['portrait']
     },
     bottomTabs: {
        titleDisplayMode: 'alwaysShow',
        // elevation: 80,
        // backgroundColor :'transparent',
        visible :false,
     },
     topBar: {
      title: {
        color:  colors.primary,
        fontFamily: fonts.mainSemiBold,
        fontSize: widths.by17,
        animate: true, 
        alignment: 'center',
      }
     },

   });
  Navigation.setRoot({
    root: {
          bottomTabs: {
            visible:false,
            animated: false,
            children: [{
              stack: {
                children: [{
                  component: {
                    name: screens.DASHBOARD,
                      id: screens.DASHBOARD
                  }
                }],
                options: {
                  visible:false,
                }
              }
            },
            {
              stack: {
                children: [{
                  component: {
                    name: screens.POINTS,
                    id: screens.POINTS
                  }
                }],
                options: {
                 visible:false,
                }
              }
            },
            {
              stack: {
                children: [{
                  component: {
                    name: screens.CODEVIEW,
                    id: screens.CODEVIEW
                  }
                }],
                options: {
                  visible:false,
                }
              }
            },
            {
              stack: {
                children: [{
                  component: {
                    name: screens.HELP,
                    id: screens.HELP
                  }
                }],
                options: {
                  visible:false,
                }
              }
            },
            {
              stack: {
                children: [{
                  component: {
                    name: screens.SES,
                    id: screens.SES
                  }
                }],
                options: {
                  visible:false,
                }
              }
            },
            ],
            options: {
              bottomTabs: {
                visible:false,
                animate: false,
                currentTabIndex: tabIndex,
                backgroundColor :colors.white,
                titleDisplayMode: 'alwaysShow',
                tabsAttachMode: 'onSwitchToTab',//together, afterInitialTab
              },
            }
          }
    }
})
};

What was the expected behaviour?

Bottom tabs should be hide

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: React Native version: Has Fabric (React Native's new rendering system) enabled: (yes/no) Node version: Device model: iOS version:

yogevbd commented 1 year ago

Fixed in #7730. Try the latest RNN version