christopherabouabdo / react-native-photo-grid

MIT License
36 stars 14 forks source link

renderItem get index of element #9

Open alainib opened 6 years ago

alainib commented 6 years ago

I will be nice to get the index of element in renderItem in case where you get array of data without unique id for each element

 <PhotoGrid
        data={this.state.datas}
        itemsPerRow={itemsPerRow}
        itemMargin={1}
        renderHeader={this.renderOptionBar}
        renderItem={this.renderGridItem}
      />

   renderGridItem = (item, itemSize,index) => {
        return <View key={index}>

      </View>
   }