Skip to content

Commit 87af4ea

Browse files
committed
Add BackButton props
1 parent d7161fc commit 87af4ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/NavBarContent.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ class NavBarContent extends React.Component {
173173
);
174174
} else if (this.props.route.index > 0) {
175175
leftCornerContent = (
176-
<NavButton onPress={this.goBack} backButtonComponent={this.props.backButtonComponent} />
176+
<NavButton onPress={this.goBack } backButtonComponent={ () => {
177+
const BackButton = this.props.backButtonComponent;
178+
const backButtonProps = this.props.route.backButtonProps || {};
179+
return <BackButton {...backButtonProps} />;
180+
}} />
177181
);
178182
}
179183

0 commit comments

Comments
 (0)