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:
parent
7d3fbbdb68
commit
730619dabf
|
@ -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>;
|
||||
},
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ export type NavigationGestureDirection = 'horizontal' | 'vertical';
|
|||
|
||||
export type NavigationRoute = {
|
||||
key: string,
|
||||
title?: string
|
||||
};
|
||||
|
||||
export type NavigationState = {
|
||||
|
|
Loading…
Reference in New Issue