Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe fix #2

Open
wants to merge 5 commits into
base: fix-masonry
Choose a base branch
from
Open

Maybe fix #2

wants to merge 5 commits into from

Conversation

mnajdova
Copy link

@mnajdova mnajdova commented Nov 2, 2021

I could find two problems.

  • I think that we need only one ResizeObserver instance, we can store it in ref. (I am not sure if this change is required) I would maybe revert it, so that we can isolate the problem better
  • In the handleResize we should depend on the elements args, not the ref we have in the component. elements[0].target would give you the masonry ref

I haven't tested this very much, but it solved the issue as far as I could see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants