eiriklv / react-masonry-component

A React.js component for using @desandro's Masonry
MIT License
1.44k stars 145 forks source link

it works only very first time and then it loses position #179

Open dhboys opened 1 year ago

dhboys commented 1 year ago

Hello, I'm frontEnd developer in South Korea. I've found lib to make layout like 'Pinterest' and I've got this lib. I mean, thanks to make this lib.

anyway, I've got little problem using this lib. it works very first time but when some states change it lost it's position.

for example,

  1. when i come in the website image

  2. change the states (category is changed) image

when it work right, Masonry tag has the style={{ position: relative; }}, but when it not works, it lost style={{ position: relative; }} it could be the cause ? thank you for reading, I look forward to reply, thank you.

dhboys commented 1 year ago

I solve the problem. just put the stlye={{ position: 'relative'; }} to Masonry's parent tag.