Closed fukemy closed 1 year ago
This is not implemented inside the library.
You can probably use the onScroll event. Getting the index would require you to calculate it dividing top
offset by itemHeight
. But one row can have multiple item. You can get itemsPerRow from onItemsPerRowChange
prop if needed.
Something like : (top / itemHeight) * itemsPerRow
the biggest problem => I can not get each section + items height
, I have only itemPerRow
which defined before, can u suggest me how to do it? I am stucking with this since a few days
onScroll callback has a parameter that contains offset from the top. You can use this to determine how long has been scrolled. Since you define the itemHeight beforehand and you know it, you can divide the offset from top by the itemHeight
Hi, thanks for useful library. I want to get the current index while scrolling, can u give me some advices