React-native-navigation: [v2] unsetting back button title does not work

Created on 30 Sep 2018  路  5Comments  路  Source: wix/react-native-navigation

Issue Description

Setting the back button title or hiding the back button title does not work

Steps to Reproduce / Code Snippets / Screenshots

  static options(props) {
    return {
      topBar: {
        visible: true,
        backButton: {
          title: '',
        },
      },
    };
  }

Environment

  • React Native Navigation version: 2.0.2569
  • React Native version: 0.57.1
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): iPhone 5s simulator

Most helpful comment

[email protected]
[email protected]
Platform: iOS
Device: Both iPhone X simulator and physical iPhone X

Dynamically updating the backButton title doesn't seem to work for me.

Navigation.mergeOptions(this.props.componentId, {
  topBar: {
    backButton: {
      title: 'some dynamic title'
    }
  }
});

However, updating it statically does work fine in my case.

static options(passProps) {
  return {
    topBar: {
      backButton: {
        title: 'some static title'
      }
    }
  };
}

All 5 comments

@guyca Could you please look into this?

same issue In version 2.0.2577

Can somebody from the team look at this?

[email protected]
[email protected]
Platform: iOS
Device: Both iPhone X simulator and physical iPhone X

Dynamically updating the backButton title doesn't seem to work for me.

Navigation.mergeOptions(this.props.componentId, {
  topBar: {
    backButton: {
      title: 'some dynamic title'
    }
  }
});

However, updating it statically does work fine in my case.

static options(passProps) {
  return {
    topBar: {
      backButton: {
        title: 'some static title'
      }
    }
  };
}

Same on version 2.0.2637. It seems that it is an old issue.

Was this page helpful?
0 / 5 - 0 ratings