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

Screens under FluidNavigator don't respect navigationOptions hence i can't customise header? #50

Closed
zloz opened this issue Jun 19, 2018 · 4 comments

Comments

@zloz
Copy link

zloz commented Jun 19, 2018

Header couldn't be customise under FluidNavigator as it doesn't respects navigationOptions, can't find any relevant example also.

navigationOptions:({navigation,screenProps}) =>{ return{ headerStyle:StackNavigationHeader.headerStyle({navigation}), headerLeft:StackNavigationHeader.headerLeftDrawer({navigation,screenProps}), headerRight:StackNavigationHeader.courseHeaderRight({navigation,screenProps}), headerTitle:StackNavigationHeader.headerTitle({navigation}) } },

@chrfalch
Copy link
Contributor

Hi @zloz: FluidNavigator does not have a header as stated in the documentation, so this won't work. Wrap it in a parent StackNavigator to customize the header.

@zloz
Copy link
Author

zloz commented Jun 20, 2018

but that would restrict me to have same header(even if customised under stacknavigator) in all the screens under fluid navigator , i want to have a different header for screens under fluid navigator

@chrfalch
Copy link
Contributor

chrfalch commented Jun 20, 2018 via email

@muhaimincs
Copy link
Contributor

I have applied it just like your suggestion. But I'm having flickering issue when hide the header on second screen.

static navigationOptions = ({navigation}) => {
    const {state: {index = 0} = {}} = navigation;
    if (index > 0) return {header: null};
    return {
      title: 'UMRAHTI',
    };
  };

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