wadackel/react-stack-grid

How I fixed overlapping!

jrnxf opened this issue · 1 comments

jrnxf commented

There's not a discussion section for this library so I'm having to create an issue (feel free to let me know if there's a better way to do this), but I wanted to share my fix for dealing with overlapping items! For background, I would see overlapping every time I viewed my grid on mobile, and then sometimes at certain breakpoints I would get unlucky and see some stacking. To resolve this, I implemented the following custom component.

https://gist.github.com/coloradocolby/4d29d94ff1c2a0612f3a4edc684c26fb

I really hope this helps someone! 🚀

Thanks! I found this resolved the same issue for me, although it is a bit of a hack; I'd love to see a fix that works to ensure more accurate height calculation within the component itself.