Skip to content

Commit c777e3b

Browse files
committed
Manually merged PR i6mi6#57 to fix interpolating action bar height
1 parent c817d00 commit c777e3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,20 @@ class ParallaxScrollView extends Component {
276276
const { viewWidth, scrollY } = this.state;
277277
if (renderStickyHeader || renderFixedHeader) {
278278
const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight);
279+
let height = interpolate(scrollY, {
280+
inputRange: [0, stickyHeaderHeight],
281+
outputRange: [0, stickyHeaderHeight],
282+
extrapolate: 'clamp'
283+
});
279284
return (
280-
<View style={[styles.stickyHeader, { width: viewWidth, ...(stickyHeaderHeight ? { height: stickyHeaderHeight } : null ) }]}>
285+
<View style={[styles.stickyHeader, { width: viewWidth }]}>
281286
{
282287
renderStickyHeader
283288
? (
284289
<Animated.View
285290
style={{
286291
backgroundColor: backgroundColor,
287-
height: stickyHeaderHeight,
292+
height: height,
288293
opacity: interpolate(scrollY, {
289294
inputRange: [0, p],
290295
outputRange: [0, 1],

0 commit comments

Comments
 (0)