Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arnars opened this issue Mar 12, 2019 · 1 comment

Comments

@arnars
Copy link

arnars commented Mar 12, 2019

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?

@arnars
Copy link
Author

arnars commented Mar 12, 2019

Demo here: https://codesandbox.io/s/xrzpy0lmqq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant