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

Commit

Permalink
fix: make headerShown option work
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 20, 2019
1 parent 452638a commit 84e9244
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/views/Header/HeaderStyleInterpolator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ function hasHeader(scene: Scene) {
if (!scene) {
return true;
}
const { descriptor } = scene;
return descriptor.options.header !== null;
const { header, headerShown } = scene.descriptor.options;

return header !== null && headerShown !== false;
}

const crossFadeInterpolation = (
Expand Down
2 changes: 1 addition & 1 deletion src/views/StackView/StackViewLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ class StackViewLayout extends React.Component<Props, State> {
// When using a floating header, we need to add some top
// padding on the scene.
const { options } = scene.descriptor;
const hasHeader = options.header !== null;
const hasHeader = options.header !== null && options.headerShown !== false;
const headerMode = this.getHeaderMode();

let floatingContainerStyle: ViewStyle = StyleSheet.absoluteFill as ViewStyle;
Expand Down

0 comments on commit 84e9244

Please sign in to comment.