react-native-view-overflow: Not working for Flatlist items
I have a TabBar component and I’m adding a badge to a tab that is inside a Flatlist. I tried this module out and I’m not getting expected results.
Code snippet
<ViewOverflow>
<FlatList
style={{overflow: 'visible', marginBottom: 4, zIndex: 5, elevation: 5}}
contentContainerStyle={{overflow: 'visible'}}
data={this.state.data}
keyExtractor={item => item.id}
extraData={this.state}
horizontal={true}
scrollEnabled={false}
renderItem={({ item, index }) => this.renderItem({ item, index })}
/>
</ViewOverflow>
Android
iOS / expected
react-native version: 0.50.4 react-native-view-overflow version: 0.0.3
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (2 by maintainers)
Commits related to this issue
- docs(flatlist): add usage with FlatList fix #7 — committed to entria/react-native-view-overflow by sibelius 6 years ago
@testshallpasswork @jgfidelis it worked! you need to use CellRendererComponent and set to ViewOverflow to RenderItem root
try this:
I used react-native-shadow-view, it dependence react-native-svg
@xiaweiss i’m using RN 0.59.10
but still can’t view shadow from elevation 😦
@testshallpasswork, did you find a solution or workaround for this problem?