react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[V2] Top bar title is not showing

Open bdavid68 opened this issue 8 years ago • 3 comments

Issue Description

Top bar title is not showing on iOS as expected to see Dashboard. I see only bottom border of top bar.

Steps to Reproduce / Code Snippets / Screenshots

Navigation.setRoot({
    root: {
      stack: {
        children: [{
          component: {
            name: 'DashboardScene',
          }
        }],
        options: {
          topBar: {
            title: {
              text: 'Dashboard'
            }
          }
        }
      }
    }
  });

Environment

  • React Native Navigation version: 2.0.2641
  • React Native version: 0.57.0
  • Platform(s) (iOS, Android, or both?): iOS(Not sure for android yet)
  • Device info (Simulator/Device? OS version? Debug/Release?): Device/Debug

bdavid68 avatar Nov 22 '18 11:11 bdavid68

@bdavid68 try to move those options to the component. LIke so:


  component: {
    ...
    options: {
      topBar: {
        ...
        title: {
          text: 'Dashboard',
        },
      },
    },
  },
}

vshkl avatar Nov 22 '18 12:11 vshkl

Thanks, @vshkl. It works!

bdavid68 avatar Nov 22 '18 12:11 bdavid68

Thanks!. This should be updated on the oficial docs.

elbrodelche avatar Jul 15 '19 01:07 elbrodelche