有没有一种方法可以添加一个固定的页脚和平面表?
我用这个词:
[https://github.com/jeremybarbet/react-native-modalize][1]我使用一个情态词库,我有这样的代码:
<Modalize
ref={ref}
modalStyle={{ flex: 1, padding: 8 }}
flatListProps={{
data: newArr(),
style: {
padding: 0,
flex: 1
},
renderItem: renderItem,
ListEmptyComponent: ShowTextWhenArrayIsEmpty,
ListHeaderComponent: <View style={s.header}>
<Text style={s.headerTitle}>Nachricht verschicken</Text>
<Input value={searchText} onChangeText={handleChangeText} placeholder='Person suchen...' style={s.textInput} />
</View>,
keyExtractor: (item, i) => i.toString(),
showsVerticalScrollIndicator: false,
stickyHeaderIndices: [0],
scrollEventThrottle: 16,
maxToRenderPerBatch: 2,
keyboardShouldPersistTaps: 'handled',
initialNumToRender: 4,
updateCellsBatchingPeriod: 200,
getItemLayout: (data, index) => ({ length: 40, offset: 40 * index, index }),
contentContainerStyle: {
justifyContent: 'center',
alignItems: 'center'
}
}}
/>有没有办法做到这一点?我需要你的帮助
发布于 2022-04-27 11:07:37
flatListProps:传递任何反应的对象-本机FlatList的道具。使用此支持将将默认的ScrollView替换为FlatList组件。
这意味着您可以使用react的原版道具。所以,您可以使用ListFooterComponent,就像使用ListHeaderComponent和ListEmptyComponent一样。
https://stackoverflow.com/questions/72022145
复制相似问题