【发布时间】:2021-11-21 04:33:32
【问题描述】:
我是 react native 的新手。
我的问题很简单:我有这个 -> 错误 VirtualizedLists 永远不应该嵌套在具有相同方向的普通 ScrollViews 中,因为它可能会破坏窗口和其他功能 - 请改用另一个 VirtualizedList 支持的容器。 我需要这个 ScroolView,因为我也想滚动标题,而不仅仅是 FlatList。任何建议如何解决?这是我的代码
<ScrollView style={styles.container}>
<Header firstHeader="My Collegues" secondHeader="All your collegues" backgroundImage="Blue" />
<View style={styles.content}>
<View style={styles.filterCompany}>
<TouchableOpacity style={styles.buttonFilter}>
<Text style={styles.companyName}>Hello B</Text>
<AntDesign style={styles.iconButton} name="downcircleo" size={20} color="white" />
</TouchableOpacity>
</View>
<View style={styles.safeAvatar}>
<FlatList
contentContainerStyle={{ flex: 1 }}
numColumns={3}
data={pomArray}
renderItem={renderItem as any}
/>
</View>
</View>
</ScrollView>
【问题讨论】:
标签: reactjs react-native react-redux react-hooks react-router