Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs Dynamic / Conditional Scene rendering #2715

Closed
tasharofi opened this issue Dec 19, 2017 · 2 comments
Closed

Tabs Dynamic / Conditional Scene rendering #2715

tasharofi opened this issue Dec 19, 2017 · 2 comments

Comments

@tasharofi
Copy link

  • react-native-router-flux "^4.0.0-beta.22"
  • react-native 0.50.3

Expected behaviour

I need to dynamically render the tabs scene...for example user A does not have permission to access some app features which is on scene A so based on the user permission level the scene A wont be rendered for user A...

Is there any way to hide / not render some specific scene of Tabs ?

@as123456py
Copy link

Duplicate of #2349
hope to be useful

@Blapi Blapi closed this as completed Dec 19, 2017
@lelup
Copy link

lelup commented Feb 8, 2018

you can duplicate and control tabbar when you click button loggin:

   <Scene key='upPortal' lazy={true} tabs={true} hideNavBar={true}  >
           <Scene key='index' title='index' hideNavBar={true} >
                //other scene
           </Scene>
           <Scene key='project'  title='project'  hideNavBar={true} >
               //other scene
           </Scene>
             <Scene key='business'   title='business' hideNavBar={true} >
                    //other scene
             </Scene>
           <Scene key='custom' title='custom'  hideNavBar={true} >
                   //other scene
           </Scene>
           <Scene key="myhome" title="myhome" hideNavBar={true} >
               //other scene
            </Scene>
   </Scene>
    
    <Scene key='upPortal2' lazy={true} tabs={true} hideNavBar={true}  >
           <Scene key='index' title='index' hideNavBar={true} >
                //other scene
           </Scene>
           <Scene key='project'  title='project'  hideNavBar={true} >
               //other scene
           </Scene>
           <Scene key='custom' title='custom'  hideNavBar={true} >
                   //other scene
           </Scene>
           <Scene key="myhome" title="myhome" hideNavBar={true} >
               //other scene
            </Scene>
   </Scene>

....
_checkTabbar() {
if (condition) {
Action.upPortal();
}
Action.upPortal2();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants