saleel / react-native-super-grid

Responsive Grid View for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onViewableItemsChanged ERROR!

mikepng opened this issue · comments

Hi,
When trying to use onViewableItemsChanged on SectionGrid it returns the error:

rowItems.map is not a function. (In 'rowItems.map(function (rowItem, rowItemIndex) {
          return keyExtractor(rowItem, rowItemIndex);
        })', 'rowItems.map' is undefined)

The prop that i added to the SuperGrid is:

onViewableItemsChanged={({ viewableItems, changed }) => console.log(viewableItems) }

Hi @mikepng

Sorry for the delay to reply. That is strange, as the prop would be passed down to SectionGrid.
I tried this prop in the example SectionGrid code and it works as expected. I believe its something else in your code that is causing the issue.
If you can create a Expo Snack with your sample code that has the error, I can help you debug.

Closing due to inactivity