Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

react-native: problem when scrolling in horizontal flatlist

$
0
0

I have a horizontal flatlist to render categories the problem is when scrolling the flatlist breaks and get reset as described blow:

enter image description here

flat list code:

<View style={styles.container}><CategorySelector        category={allCategories}        isSelected={(selectedCategory === null || allCategories.id === selectedCategory) ? true : false}      /><FlatList        horizontal        data={I18nManager.isRTL ? categories.reverse() : categories}        renderItem={renderCategoryList}        keyExtractor={(item, index) => index.toString()}        showsHorizontalScrollIndicator={false}      /></View>

Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>