react-router-navigation icon indicating copy to clipboard operation
react-router-navigation copied to clipboard

BottomNavigation with Outside Navigation

Open zachrnolan opened this issue 6 years ago • 1 comments

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

There seems to be a weird bug when combining BottomNavigation with another Navigation outside of it:

<Switch>
    <Route path="/action-funnel" component={AddActionNavigation} />
    <Route
        path="/"
        render={() => (
          <BottomNavigation
            lazy={true}
            tabTintColor={colors.LIGHTGRAY}
            tabActiveTintColor={colors.WHITE}
            tabBarStyle={{backgroundColor: colors.SEAGREEN, height: 60}}
          >
            <Tab
              label="Accounts"
              path="/accounts"
              component={AccountNavigation}
              renderTabIcon={({ focused, tabTintColor, tabActiveTintColor }) => (
                <Icon
                  name="logo-usd"
                  size={24}
                  style={{
                    color: focused ? tabActiveTintColor : tabTintColor,
                  }}
                />
              )}
            />
            <Tab
              label="Actions"
              path="/actions"
              component={ActionNavigation}
              renderTabIcon={({ focused, tabTintColor, tabActiveTintColor }) => (
                <Icon
                  name="ios-flash"
                  size={24}
                  style={{
                    color: focused ? tabActiveTintColor : tabTintColor,
                  }}
                />
              )}
            />
        </BottomNavigation>
    )}
  />
</Switch>
  1. Go to Actions Tab /actions
  2. Tap on Link that takes user to /action-funnel (outside of bottom navigation)
  3. Tap a link that takes the user back to /actions (using this.props.history.goBack())
  4. Switch to Accounts Tab (or any other tab)
  5. Switch back to Actions Tab /actions
  6. The screen is still showing the /action-funnel navigation and view.

What is the expected behavior?

It should show the Actions Tab view instead of Actions Funnel.

Environment (include versions). Did this work in previous versions?

  • Device: iPhone 6
  • OS: iOS
  • React-Native (version): 0.54.1
  • React-Router (version): 4.2.0
  • React-Router-Navigation (version): 1.0.0-rc.4

zachrnolan avatar Apr 12 '18 04:04 zachrnolan

This error is related to a library design problem. I'm fixing that on the dev branch. But it requires a lot of refactoring and I don't have much time to fix it. I hope to finish in the coming weeks.

LeoLeBras avatar Apr 24 '18 19:04 LeoLeBras