BugFix: Title should be from scene.route.title

Summary:
Its a minor Bug fix for rendering Title in NavigationHeader
Closes https://github.com/facebook/react-native/pull/8437

Differential Revision: D3507319

Pulled By: ericvicenti

fbshipit-source-id: ff4aa36be3c4991be11aabecbaad952c015a60e2
This commit is contained in:
Sunny Gurnani 2016-06-30 17:54:50 -07:00 committed by Facebook Github Bot 9
parent 7d3fbbdb68
commit 730619dabf
2 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,7 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
static defaultProps = {
renderTitleComponent: (props: SubViewProps) => {
const {navigationState} = props;
const title = String(navigationState.title || '');
const title = String(props.scene.route.title || '');
return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
},

View File

@ -23,6 +23,7 @@ export type NavigationGestureDirection = 'horizontal' | 'vertical';
export type NavigationRoute = {
key: string,
title?: string
};
export type NavigationState = {