Closed ruijdacd closed 5 years ago
So I've been thinking about the issue itself, and I've come up with a quick solution.
I've updated the codesandbox with a workaround, but I also wanted to know if you would be available to analyse the issue on your side too.
Hi @ruijdacd can you share your workaround please?, I have a similar situation and I think my solution is pretty much complicated
The workaround for me was having a conditional wrap for the sticky element. The codesandbox is updated with the workaround I came up with
@edgar-raweng could you share your solution?
Hi again,
I've been loving the work you're doing
react-sticky-box
and with the latest updates I've noticed such performance gains in the projects I've used it.With that being said, I have found an issue regarding the use of
react-sticky-box
inside a css grid (display: grid
);Here it's a codesandbox with the issue detailed: https://codesandbox.io/s/p982r552lq
Basically, when the item's height increases to a value above the viewport height, the stickiness goes away and the item's position is reset to the position defined in the grid area.