You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the issue is that the sticky component does not capture the scroll events of the parent div which creates the scrollable area. Adding an additional (optional) prop taking in the ref of the parent should allow the component to bind to the parent's scroll event.
The text was updated successfully, but these errors were encountered:
Is it not possible for you to do something like this: <StickyContainer style={{ maxHeight: "400px", overflowY: "auto" }}>
Basically instead of defining an extra div you use the SectionContainer component which will intern also render a div. You could also append a custom class with className..
This is what I did in my App and it's working great.
I'm submitting a ...
If you're reporting a bug, please provide a minimal demonstration of the problem
When wrapped within an enclosing div with a max height and scrollbar the Sticky components no longer stick.
https://codesandbox.io/embed/react-sticky-sample-project-0yz7t
What is the current behavior?
The sticky component no longer sticks
What is the expected or desired behavior?
The sticky component sticks on scroll
Why do you want this? What use case do you have?
What is your environment?
Is there anything else I should know?
I believe the issue is that the sticky component does not capture the scroll events of the parent div which creates the scrollable area. Adding an additional (optional) prop taking in the ref of the parent should allow the component to bind to the parent's scroll event.
The text was updated successfully, but these errors were encountered: