eiriklv / react-masonry-component

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

Useless complete items reload #95

Closed baktun14 closed 6 years ago

baktun14 commented 7 years ago

I was digging in the source code to find out why my whole list was reloading when only a property of an item was changing and I found that no matter if there were appended/prepended/moved etc, it was still reloading it all.

If you look here you can see that we are comparing the length of the previous know childrens (number) with the current known childrens (array) therefor always thruthy.

afram commented 6 years ago

Should be fixed in v6.0.0

Please let me know if it works for you.

sorry again for the delay in merging in your PR.

baktun14 commented 6 years ago

Better late than never! Thanks @afram