Fix header ModularLeftComponent to goBack from child navigation (#4023)

This commit is contained in:
Eric Vicenti
2018-04-20 06:33:36 -07:00
committed by Brent Vatne
parent 202609d9cf
commit abd5200739

View File

@@ -166,7 +166,7 @@ class Header extends React.PureComponent {
ButtonContainerComponent,
LabelContainerComponent
) => {
const { options } = props.scene.descriptor;
const { options, navigation } = props.scene.descriptor;
const backButtonTitle = this._getBackButtonTitleString(props.scene);
const truncatedBackButtonTitle = this._getTruncatedBackButtonTitle(
props.scene
@@ -178,7 +178,7 @@ class Header extends React.PureComponent {
const goBack = () => {
// Go back on next tick because button ripple effect needs to happen on Android
requestAnimationFrame(() => {
this.props.navigation.goBack(props.scene.descriptor.key);
navigation.goBack(props.scene.descriptor.key);
});
};