File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -276,15 +276,20 @@ class ParallaxScrollView extends Component {
276
276
const { viewWidth, scrollY } = this . state ;
277
277
if ( renderStickyHeader || renderFixedHeader ) {
278
278
const p = pivotPoint ( parallaxHeaderHeight , stickyHeaderHeight ) ;
279
+ let height = interpolate ( scrollY , {
280
+ inputRange : [ 0 , stickyHeaderHeight ] ,
281
+ outputRange : [ 0 , stickyHeaderHeight ] ,
282
+ extrapolate : 'clamp'
283
+ } ) ;
279
284
return (
280
- < View style = { [ styles . stickyHeader , { width : viewWidth , ... ( stickyHeaderHeight ? { height : stickyHeaderHeight } : null ) } ] } >
285
+ < View style = { [ styles . stickyHeader , { width : viewWidth } ] } >
281
286
{
282
287
renderStickyHeader
283
288
? (
284
289
< Animated . View
285
290
style = { {
286
291
backgroundColor : backgroundColor ,
287
- height : stickyHeaderHeight ,
292
+ height : height ,
288
293
opacity : interpolate ( scrollY , {
289
294
inputRange : [ 0 , p ] ,
290
295
outputRange : [ 0 , 1 ] ,
You can’t perform that action at this time.
0 commit comments