React-native-router-flux: hideBackImage hides but NOT disable

Created on 5 Jan 2017  路  1Comment  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v3.36.0
  • react-native v0.37.0

Expected behaviour

I believe hidebackImage property should be hide the back button and disable it on the navbar.

Actual behaviour

While the image is hidden, I am still able to navigate back by pressing that area of the navbar.

Steps to reproduce

Once the user has logged in, I take him to the "main" scene whose initial scene is "events" whose initial scene is "feed".

Actions.create(
  <Scene key="root">
    <Scene key="login"
           component={Login}
           initial
           hideNavBar
           type={ActionConst.RESET}
    />
    <Scene key="main"
           tabs
           tabBarStyle={styles.tabBarStyle}
           tabBarSelectedItemStyle={styles.tabBarSelectedItemStyle}
    >
      <Scene
        initial
        key="events"
        icon={TabIcon}
        iconName="md-home"
        hideBackImage
      >
        <Scene key="feed" hideBackImage component={EventsFeed} title="Events" />
        <Scene key="eventFull" component={EventFull} title="Event" />
        <Scene key="editEvent" component={EditEvent} title="Edit Event" />
        <Scene key="eventHost" component={Person} title="Host" />
      </Scene>
      <Scene
        key="eventForm"
        title="Create Event"
        component={EventForm}
        icon={TabIcon}
        iconName="md-flash"
        hideBackImage
      />
      <Scene
        key="profile"
        icon={TabIcon}
        iconName="md-person"
      >
        <Scene key="profileDefault" initial hideBackImage component={Profile} title="Profile" />
        <Scene key="profileEventFull" component={EventFull} title="Event" />
        <Scene key="profileEditEvent" component={EditEvent} title="Edit Event" />
        <Scene key="profileEventHost" component={Person} title="Host" />
      </Scene>
    </Scene>
  </Scene>
);

I thought perhaps it was firing the press on one of the parent scenes so I put hideBackImage on all of them, but I was still able to get back to the "login" scene from "feed"

Most helpful comment

Instead of hideBackImage, use renderBackButton={()=>(null)}

It works

>All comments

Instead of hideBackImage, use renderBackButton={()=>(null)}

It works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fgrs picture fgrs  路  3Comments

booboothefool picture booboothefool  路  3Comments

xnog picture xnog  路  3Comments

sreejithr picture sreejithr  路  3Comments

willmcclellan picture willmcclellan  路  3Comments