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

react-native-router-flux back button shows top #2806

Closed
arif2009 opened this issue Jan 18, 2018 · 3 comments
Closed

react-native-router-flux back button shows top #2806

arif2009 opened this issue Jan 18, 2018 · 3 comments

Comments

@arif2009
Copy link

arif2009 commented Jan 18, 2018

Version

  • react-native-router-flux v4.0.0-beta.27 (v3 is not supported)
  • react-native v0.51.0

Expected behaviour

I am trying to create nested routing, but i am getting back button at the top like below (red marked area) :

Top Nav

Actual behaviour

I want to get back button with title.

Steps to reproduce

const RouterComponent = () => {
    return(
        <Router>
            <Scene key="root">
                <Scene key="auth">
                    <Scene key="login" component={LoginForm} title="Please Login" />
                </Scene>

                <Scene key="main">
                    <Scene key="userList" component={UserList} title="NUMBER OF DONOR : XX" />
                </Scene>
            </Scene>
        </Router>
    );
};

export default RouterComponent;

Stackoverflow Issue

@Blapi
Copy link
Collaborator

Blapi commented Jan 18, 2018

Have a look at this please: #2675

@Blapi Blapi closed this as completed Jan 18, 2018
@arif2009
Copy link
Author

arif2009 commented Jan 18, 2018

@Blapi In my case BackButton shows and works fine but problem is 1st row it shows BackButton and 2nd row it shows Title like my screenshot, they are not showing together. I update my screenshot you can consider it again.

@arif2009
Copy link
Author

I got my solution. I solved it by adding hideNavBar={true} on parent and hideNavBar={false} on child Scene.

const RouterComponent = () => {
    return(
        <Router>
            <Scene key="root">
                <Scene key="auth" hideNavBar={true}>
                    <Scene key="login" hideNavBar={false} component={LoginForm} title="Please Login" />
                </Scene>

                <Scene key="main" hideNavBar={true}>
                    <Scene key="userList" hideNavBar={false} component={UserList} title="NUMBER OF DONOR : XX" />
                </Scene>
            </Scene>
        </Router>
    );
};

export default RouterComponent;

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

2 participants