react-sticky
react-sticky copied to clipboard
bottomOffset in relative mode not functional
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?
Hm could you make a Code Sandbox or similar? I'm not sure I understand what the problem is.
Sure, will do... I'll try to get one done this weekend.