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

Custom navBar component doesn't get custom title for a component #2348

Closed
mzdunek93 opened this issue Sep 7, 2017 · 3 comments
Closed

Custom navBar component doesn't get custom title for a component #2348

mzdunek93 opened this issue Sep 7, 2017 · 3 comments

Comments

@mzdunek93
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux 4.0.0-beta.21
  • react-native v0.47.0

Expected behaviour

When using a custom navBar component in a Stack navigator and setting a scene's title through component's navigationOptions, the title should be passed as a prop to the navBar, preferably as props.title.

Actual behaviour

The only title I get is the one set under the title key of the Scene. The weird thing is that when I'm using the StackNavigator's default header, the title is passed correctly.

@as123456py
Copy link

I have the same promble.
At present,I can only use the title key of the Scene,and in custom navBar component ,I only render icon image.
I hope it works for you

@as123456py
Copy link

Hi,you can try showLabel={false} ,like this:
<Scene key='upPortal' lazy={true} tabs={true} showLabel={false}> //other Scene </Scene>
that will hide all the default title under the Scene

@aksonov
Copy link
Owner

aksonov commented Sep 10, 2017

Sorry, but you are using react-navigation feature (static navigationOptions) and want to make it work within RNRF advanced functionality (like dynamic prop.title)? Please read docs and follow docs how to define custom navBar for RNRF.

@aksonov aksonov closed this as completed Sep 10, 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

3 participants