dantrain / react-stonecutter

Animated grid layout component for React

Home Page:http://dantrain.github.io/react-stonecutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with pagination

antherkiv opened this issue · comments

Hello, I want to say that your component is really awesome, I modified the measureItems file, order to wait for the load of image in individual children.

But I have a problem with pagination, the first time the page only flash, it's because you use a grid when the elements are not new and size was calculated, so, Can I render in a grid the new and the old elements?

(I'm sorry for my very bad english, I'm not a native speaker).

Thank you and best regards.

Hi, thanks for the kind words, sorry for the late reply!

I have updated measureItems myself to have an option to wait for images to load, perhaps you could give this a try and see if it helps? Something like:

const Grid = measureItems(SpringGrid, { measureImages: true })