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

I am getting list on one side (Left side) suddenly. #16

Open
sensoft2207 opened this issue Mar 2, 2020 · 2 comments
Open

I am getting list on one side (Left side) suddenly. #16

sensoft2207 opened this issue Mar 2, 2020 · 2 comments

Comments

@sensoft2207
Copy link

As I have integrated this lib in my project and it is working fine but somehow suddenly getting list on one side(Left side). I want this in two column as previous. So do you have any solution on this?

Thanks
Simulator Screen Shot - iPhone XR - 2020-03-02 at 10 23 15

@pROFESOR11
Copy link

+1
It works perfect on first render. Added items are rendered on single column though.

If you're going to render static data, then good to go!

As maintainer stated that s/he is not maintaining this project anymore, I am not expecting any solution and won't use this lib unluckily. I am writing this comment for those who is planning to use as it is.

@AkshayAdiga1997
Copy link

AkshayAdiga1997 commented Jan 9, 2021

Sample example to solve the issue. notes can be changed dynamically. My notes will contain the entire notes array always. Might see some flicker though.

const setNotes = async () => {
    await masonryRef.current.clear();
    masonryRef.current.addItems(notes);
  };

  useEffect(() => {
    setNotes();
  }, [notes]);
  

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

No branches or pull requests

3 participants