ihor / react-native-scalable-image

React Native Image component which scales width or height automatically to keep the original aspect ratio
https://www.npmjs.com/package/react-native-scalable-image
MIT License
315 stars 67 forks source link

Any reason why this component would not work inside a flatlist/scrollview? #34

Closed kalideir closed 3 years ago

kalideir commented 3 years ago

I used this library to view a list of products images while maintaining their original aspect ratio. What I noticed was that, only first n products show up. The rest is not showing. I tried different ways to view the list of items, but same result nonetheless.

This my render body:

    <View style={[common.flex, styles.screen]}>
      <HomeHeader />
      <IsLoading />
      {products.length && (
        <FlatList
          data={products}
          horizontal={false}
          keyExtractor={(_, index) => index.toString()}
          style={styles.productsView}
          renderItem={({ item }) => <Product product={item} />}
        />
      )}
   </View>