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

Tabbar Navigation always goes back to the last screen #2026

Closed
isAlmogK opened this issue Jul 13, 2017 · 5 comments
Closed

Tabbar Navigation always goes back to the last screen #2026

isAlmogK opened this issue Jul 13, 2017 · 5 comments

Comments

@isAlmogK
Copy link

I'm version 8 beta
I have a tabbar
Tab 1

  • Home
  • Teams
    Tab 2
  • Photos

If I'm on the teams view and move onto the photos view and then click on the tab 1 I'm taken to the teams view the last view I was on, but I should be taken to the home view which is the first view for tab 1.

bug

@aksonov
Copy link
Owner

aksonov commented Jul 13, 2017

It seem ReactNavigation behaviour, but maybe I didn't understand issue. I want to repeat, screenshots only are not helpful for me, I need runnable project also.

@isAlmogK
Copy link
Author

Possible it's a ReactNavigation behavior but I didn't have this issue when I using React Navigation.
Let me explain
I have the home tab which has to two internal pages home and teams if I navigate to teams and then to the photos tabs and then click the home tab at the bottom the app goes or loads the teams component i.e. the last I was on it should load the home view.

@aksonov
Copy link
Owner

aksonov commented Jul 13, 2017

It is about 'backBehavior' for TabNavigator. It is set to 'none' by RNRF:
https://reactnavigation.org/docs/navigators/tab
Maybe I will remove 'none' and use default value instead ('initialRoute') for beta.9

@isAlmogK
Copy link
Author

I would suggest using initialRoute I believe that is more of the expected behavior

aksonov added a commit that referenced this issue Jul 14, 2017
- Enhancement: support inheritance of scene props (useful for `headerMode` attribute for different RN StackNavigator animation)
- Fix: attempt to fix react-navigation pushes instead of jumping when user taps the same tab (#2024)
- Enhancement: use navBarButtonColor or tintColor or headerTintColor for image button tintcolor (#2028)
- Fix: use backBehavior='initialRoute' by default (#2026)
- Enhancement: allow right/leftTitle, right/leftButtonImage to be static functions within scene component
- Enhancement: allow wrapping all screens and navbar buttons with `wrapBy` parameter for `Router`. It could be `observer` from MobX, or `connect` from Redux or any other function.
- Fix: eslint formatting, fix CircleCI build
@aksonov
Copy link
Owner

aksonov commented Jul 14, 2017

I've removed 'none' as back behaviour but don't see any changes. Maybe you could check ReactNavigation itself for desired behaviour.

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