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

Hot to focus second tab when push tabBar Scene? #2141

Closed
lucianomlima opened this issue Jul 30, 2017 · 2 comments
Closed

Hot to focus second tab when push tabBar Scene? #2141

lucianomlima opened this issue Jul 30, 2017 · 2 comments

Comments

@lucianomlima
Copy link
Contributor

Version

Tell us which versions you are using:

  • react-native-router-flux v3.39.2
  • react-native v0.44.2

Expected behaviour

I have the following scenes:

Actions.create(
    <Scene key={'modal'} component={Modal}>
        <Scene key={'root'} leftButtonIconStyle={style.navBarButtonIcon}>
            <Scene key="drawer" component={NavigationDrawer} open={false}>
                <Scene
                    key="drawerChildrenWrapper"
                    drawerIcon={drawerIcon}
                    backButtonTextStyle={style.navBarButtonText}
                    leftButtonIconStyle={style.navBarButtonIcon}>
                    <Scene
                        initial
                        key="main"
                        component={MainScreen} />
                    <Scene
                        tabs
                        key="tabbar"
                        tabBarStyle={style.tabBar}
                        tabBarSelectedItemStyle={style.tabBarActive}
                        >
                        <Scene
                            drawerIcon={drawerIcon}
                            icon={BeautyIcon}
                            key='beauty'
                            title={'Estética'}
                            component={SaleScreen} />
                        <Scene
                            drawerIcon={drawerIcon}
                            icon={HealthIcon}
                            key='health'
                            title={'Saúde'}
                            component={SaleScreen} />
                    </Scene>
                    <Scene
                        key="about"
                        component={AboutScreen} />
                    <Scene
                        key="login"
                        component={LoginScreen} />
                    ...
                </Scene>
            </Scene>
        </Scene>
        <Scene
            direction="vertical"
            key="filter"
            title="Filtros"
            panHandlers={null}
            component={FilterScreen} />
    </Scene>
);

My starts on main scene and I try to push tabbar scene from buttons press on mais scene.
First button push and focus first tab and second button, second tab.
But I only make this works pushing tabbar action, not beauty and health.

Actual behaviour

Push tabbar focused in one tab.

Steps to reproduce

I try Actions.beauty() and Actions.health(). Focus actions is dispatched but don't work.
When I use Actions.tabbar() always go to first tab.
How I can push tabbar scene focused in second tab?

@aksonov
Copy link
Owner

aksonov commented Jul 30, 2017 via email

@aksonov
Copy link
Owner

aksonov commented Jul 30, 2017 via email

@aksonov aksonov closed this as completed Jul 30, 2017
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