Packery layout is not working as expected in meteor with react


#1

Hello Guys !!

I am using packery layout for layouting the several items. Its working fine in initial mode, but when I create new item, then that newly created item is overlap with the first item, and when I refresh the page, then its working fine.

Here is the code sample I am using while an item is rendered …

   componentDidMount(){        
        $('#packery-layout').packery({
            itemSelector: '.item',
            gutter: 10
        });
    }
    componentDidUpdate(){
        $('#packery-layout').packery({
            itemSelector: '.item',
            gutter: 10
        });
    }

what I want is that, when I create a new design, then newly created design should not be overlapped with the first item.

Any clue/solution for this issue ?

Thanks.


#2

In the end, Due to lot of research and study, the issue is solved.:slight_smile:


#3

How did you do this? You may be able to help others struggling with the same problem.