diff --git a/packages/stack/src/views/Header/HeaderContainer.tsx b/packages/stack/src/views/Header/HeaderContainer.tsx index c940343b..04b872a8 100644 --- a/packages/stack/src/views/Header/HeaderContainer.tsx +++ b/packages/stack/src/views/Header/HeaderContainer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; -import { NavigationRoute } from 'react-navigation'; +import { NavigationContext, NavigationRoute } from 'react-navigation'; import { Layout, HeaderScene, @@ -88,36 +88,40 @@ export default function HeaderContainer({ }; return ( - - onContentHeightChange({ - route: scene.route, - height: e.nativeEvent.layout.height, - }) - : undefined - } - pointerEvents="box-none" - accessibilityElementsHidden={!isFocused} - importantForAccessibility={ - isFocused ? 'auto' : 'no-hide-descendants' - } - style={ - mode === 'float' || options.headerTransparent - ? styles.header - : null - } + value={scene.descriptor.navigation} > - {options.header !== undefined ? ( - options.header === null ? null : ( - options.header(props) - ) - ) : ( -
- )} - + + onContentHeightChange({ + route: scene.route, + height: e.nativeEvent.layout.height, + }) + : undefined + } + pointerEvents="box-none" + accessibilityElementsHidden={!isFocused} + importantForAccessibility={ + isFocused ? 'auto' : 'no-hide-descendants' + } + style={ + mode === 'float' || options.headerTransparent + ? styles.header + : null + } + > + {options.header !== undefined ? ( + options.header === null ? null : ( + options.header(props) + ) + ) : ( +
+ )} + + ); })}