I have a list of items that each item has an image album in a horizontal FlatList
<FlatList
ref={it => {
carousel = it;
}}
onContentSizeChange={()=> this.carousel.scrollToEnd()}
scrollEnabled
data={images}
horizontal
renderItem={({ item, index }) => renderRow(item, index)}
keyExtractor={item => item.title}
onEndReachedThreshold={0.7}/>
I want each item to scrollToEnd
const scrollToEnd = () => carousel.scrollToEnd({ animated: false });
But scrollToEnd
works only on the last item in the list and all other items are in first image of album
What should I do?