React-native-navigation: [v2] setting top bar background color with mergeOption does not work

Created on 27 Oct 2018  ·  2Comments  ·  Source: wix/react-native-navigation

Issue Description

setting top bar background color with mergeOption does not work

Steps to Reproduce / Code Snippets / Screenshots

push screen with top bar background color transparent
mergeOption for top bar background color with any color


Environment

  • React Native Navigation version: 2.0.2621
  • React Native version: 0.57.3
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator
iOS

Most helpful comment

Try this:

Navigation.mergeOptions(componentId, {
  topBar: {
    background: {
      color: '#00ff00',
      translucent: false
    }
  }
});

When topBar.background.color receive transparent color it also set translucent: true.
We might consider removing it

All 2 comments

Try this:

Navigation.mergeOptions(componentId, {
  topBar: {
    background: {
      color: '#00ff00',
      translucent: false
    }
  }
});

When topBar.background.color receive transparent color it also set translucent: true.
We might consider removing it

@yogevbd it worked. thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdrobinson picture bdrobinson  ·  3Comments

edcs picture edcs  ·  3Comments

nbolender picture nbolender  ·  3Comments

viper4595 picture viper4595  ·  3Comments

charlesluo2014 picture charlesluo2014  ·  3Comments