@@ -5,8 +5,8 @@ import { Animated, ScrollView, StyleSheet, View } from 'react-native';
55import  _  from  'lodash' ; 
66
77export  type  Props  =  { 
8-   children :  React$Element < any > , 
9-   childrenStyle :  any , 
8+   children ?: ? React$Element < any > , 
9+   childrenStyle ?: ? any , 
1010  overlayColor : string , 
1111  fadeOutForeground : boolean , 
1212  foregroundParallaxRatio : number , 
@@ -17,7 +17,7 @@ export type Props = {
1717  renderFixedForeground : ( )  =>  React$Element < any > , 
1818  renderForeground : ( )  =>  React$Element < any > , 
1919  renderHeader : ( )  =>  React$Element < any > , 
20-   renderTouchableFixedForeground :  ( )  =>  React$Element < any > , 
20+   renderTouchableFixedForeground ?: ? ( )  =>  React$Element < any > , 
2121} ; 
2222
2323export  type  DefaultProps  =  { 
@@ -172,10 +172,6 @@ class ImageHeaderScrollView extends Component<Props, State> {
172172  } 
173173
174174  renderTouchableFixedForeground ( )  { 
175-     if  ( ! this . props . renderTouchableFixedForeground )  { 
176-       return  < View  /> ; 
177-     } 
178- 
179175    const  height =  this . interpolateOnImageHeight ( [ this . props . maxHeight ,  this . props . minHeight ] ) ; 
180176
181177    const  headerScale  =  this . state . scrollY . interpolate ( { 
@@ -189,6 +185,10 @@ class ImageHeaderScrollView extends Component<Props, State> {
189185      transform : [ {  scale : headerScale  } ] , 
190186    } ; 
191187
188+     if  ( ! this . props . renderTouchableFixedForeground )  { 
189+       return  < View  /> ; 
190+     } 
191+ 
192192    return  ( 
193193      < Animated . View  style = { [ styles . header ,  styles . touchableFixedForeground ,  headerTransformStyle ] } > 
194194        { this . props . renderTouchableFixedForeground ( ) } 
0 commit comments