KyleAMathews/react-headroom

pinStart not working as expected, header jumps up when scrollDirection=up and currentScrollY < pinStart

Opened this issue · 1 comments

When using pinStart the header jumps up whenever it hits unfixed when the scrollDirection="up" and currentScrollY < pinStart.

I can fix this by amending line 18 in shouldUpdate.js:

else if (currentScrollY <= props.pinStart && state.state !== 'unfixed' && ['pinned', 'unfixed'].indexOf(state.state) < 0)

And then making the default state pinned.

But I guess that is not meant to be like this?