Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 1799e04

Browse files
authored
add onCancelPress to Header for Android
1 parent a134c55 commit 1799e04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Header.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ export default class Header extends React.PureComponent {
9292
}
9393

9494
_navigateBack = () => {
95-
this.props.navigation.goBack(null);
95+
if (this.props.onCancelPress) {
96+
this.props.onCancelPress(this.props.navigation.goBack);
97+
} else {
98+
this.props.navigation.goBack();
99+
}
96100
};
97101

98102
_maybeRenderBackButton = () => {

0 commit comments

Comments
 (0)