Describe the bug
It appears the width calculation of each item breaks if the layout gives the masonry smaller available space, and gives it back afterwards. I've detected this with animations using framer-motion, see sandbox below. The masonry container appears to get the correct width. Also, triggering a rerender seems to fix the issue, but i don't know when to rerender in order to fix that.
To Reproduce
Hover over the nav bar, in order for it to grow. Then hover away and the masonry stays in the shrunk state
https://codesandbox.io/p/sandbox/frosty-framework-kfksfg
Expected behavior
The layout should adapt to wrapped/unwrapped text and calculate the width accordingly.
Screenshots
Before:

After:

Describe the bug
It appears the width calculation of each item breaks if the layout gives the masonry smaller available space, and gives it back afterwards. I've detected this with animations using framer-motion, see sandbox below. The masonry container appears to get the correct width. Also, triggering a rerender seems to fix the issue, but i don't know when to rerender in order to fix that.
To Reproduce
Hover over the nav bar, in order for it to grow. Then hover away and the masonry stays in the shrunk state
https://codesandbox.io/p/sandbox/frosty-framework-kfksfg
Expected behavior
The layout should adapt to wrapped/unwrapped text and calculate the width accordingly.
Screenshots
Before:


After: