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

bottomOffset in relative mode not functional #235

Open
bradduck opened this issue Apr 4, 2018 · 2 comments
Open

bottomOffset in relative mode not functional #235

bradduck opened this issue Apr 4, 2018 · 2 comments

Comments

@bradduck
Copy link

bradduck commented Apr 4, 2018

I have a use case where the stick element is within an overflowing <StickyContainer />, yet requires a bottomOffset. It appears as though bottomOffset does not work correctly when <Sticky> is in relative mode. I believe I have a fix that will correct this:

const bottomDifference = (this.props.relative ? parent.scrollHeight - parent.scrollTop : distanceFromBottom) - this.props.bottomOffset - calculatedHeight;

Thoughts on this change? Is there another way to accomplish what I'm trying to do?

@vcarl
Copy link
Contributor

vcarl commented Apr 4, 2018

Hm could you make a Code Sandbox or similar? I'm not sure I understand what the problem is.

@bradduck
Copy link
Author

bradduck commented Apr 6, 2018

Sure, will do... I'll try to get one done this weekend.

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

No branches or pull requests

2 participants