alexZajac / react-native-skeleton-content

A customizable skeleton-like loading placeholder for react native projects using expo.
https://www.npmjs.com/package/react-native-skeleton-content
MIT License
614 stars 134 forks source link

flatlist data not showing inside <SkeletonContent> #54

Closed komalharmale closed 2 years ago

komalharmale commented 3 years ago

Describe the bug i am fetching some data from api and showing inside the flatlist ...i have use <SkeletonContent to show loading indicator until we didn't get api response..but after getting the api response i am setting isloding value as false.but flatlist not rendering inside its showing nothing on screen

To Reproduce Steps to reproduce the behavior:

take one 2.inside that add flatlist to show some data check result Expected behavior expecting flatlist that showing api data after setting isloding value as false

Device:]android/ios any OS: any PAckage version:1.0.13

Additional context <SkeletonContent containerStyle={{flex: 1, width: '100%'}} isLoading={spinner} layout={[ {key: 'someId', width: 320, height: 20, marginBottom: 6}, {key: 'someOther', width: 380, height: 20, marginBottom: 6}, {key: 'someOtherId', width: 380, height: 30, marginBottom: 6}, ]}> <FlatList nestedScrollEnabled={true} style={{flex: 1}} data={data.data} renderItem={renderItem} horizontal={true} keyExtractor={item => '' + item.pId} contentContainerStyle={{ flexGrow: 1, }} ListFooterComponentStyle={{marginHorizontal: 15}} // scrollEnabled={true} showsHorizontalScrollIndicator={true} />

darkfadr commented 3 years ago

FlatList has the ListEmptyComponent property when you can define what should be rendered when you're in the loading/no data phase. That's probably why nothing shows

RamanSB commented 10 months ago

FlatList has the ListEmptyComponent property when you can define what should be rendered when you're in the loading/no data phase. That's probably why nothing shows

Life saver!

DSQL-MONGKEY commented 9 months ago

FlatList has the ListEmptyComponent property when you can define what should be rendered when you're in the loading/no data phase. That's probably why nothing shows

Thankyou you save my life tho...