Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 84e9244

Browse files
committed
fix: make headerShown option work
1 parent 452638a commit 84e9244

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/views/Header/HeaderStyleInterpolator.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ function hasHeader(scene: Scene) {
66
if (!scene) {
77
return true;
88
}
9-
const { descriptor } = scene;
10-
return descriptor.options.header !== null;
9+
const { header, headerShown } = scene.descriptor.options;
10+
11+
return header !== null && headerShown !== false;
1112
}
1213

1314
const crossFadeInterpolation = (

src/views/StackView/StackViewLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ class StackViewLayout extends React.Component<Props, State> {
956956
// When using a floating header, we need to add some top
957957
// padding on the scene.
958958
const { options } = scene.descriptor;
959-
const hasHeader = options.header !== null;
959+
const hasHeader = options.header !== null && options.headerShown !== false;
960960
const headerMode = this.getHeaderMode();
961961

962962
let floatingContainerStyle: ViewStyle = StyleSheet.absoluteFill as ViewStyle;

0 commit comments

Comments
 (0)