我有一个水平平面列表,但它没有滚动
我还不知道原因
有人可以帮我吗?
<FlatList
data={dashboardData}
contentContainerStyle={{
width: '100%',
paddingHorizontal: 30,
flex: 1,
}}
keyExtractor={key => key}
renderItem={renderItem}
horizontal
showsHorizontalScrollIndicator={false}
/>
答案 0 :(得分:0)
将 contentContainerStyle
更新为,
...
contentContainerStyle={{
//Remove `flex: 1` and `width` property, that will wrap all of the child views.
paddingHorizontal: 30,
}}
...