-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
header onBack bug? #2146
Comments
Please try to reproduce on Example project and give me a link. |
I am in China, do you look at this git address (https://git.oschina.net/stulip/react-native-template) Can you visit? Project catalog Home click Android or iOS text. |
Do you see the bug on iOS? I don't have android sdk. |
There is also this problem. |
I can't help here, I could work only with modified Example from this repository, not your projects. |
Yes, I changed your example: |
Home is used to demonstrate 'pop and push' action - it cannot be used for initial scenes like TabView. |
It is definitely configuration problem - you are calling screens from another navigation tree - so you will be switched to that tree (it is standard behaviour determined by react-navigation), so back action will return you to parent tree, not your screen. You could try to use |
export default props => ( <Scene key="root" hideNavBar> <Scene key="home" tabs initial={props.initKey === 'home'} tabBarComponent={TabBarBottom} > <Scene tabBarIcon={welcomeIcon} key="homeWelcome" tabBarLabel="Welcome" component={Welcome} title="React Native"/> <Scene tabBarIcon={homeIcon} key="homeIndex" title="home" tabBarLabel="home" component={HomeScene}/> <Scene tabBarIcon={imIcon} key="homeIm" title="im" tabBarLabel="im" component={ImScene}/> <Scene tabBarIcon={meIcon} key="homeMe" title="me" tabBarLabel="me" component={MeScene}/> </Scene> <Scene key="sub" hideTabBar initial={props.initKey === 'subLogin'} headerStyle={styles.headerStyle} headerTitleStyle={styles.headerTitleStyle} tintColor={mainColors.sub.headerTitleColor} > <Scene key="subLogin" component={Login} hideNavBar/> <Scene key="subIOS" component={IOS} title="iOS" /> <Scene key="subAndroid" component={Android} title="Android"/> </Scene> </Scene> )
I am using the Actions.push ("subAndroid") on the tabs welcome page;
And then click on the subAndroid page header return button, the results are not welcome page welcome page
But the Login page
Is my configuration problem, or bug?
The text was updated successfully, but these errors were encountered: