I want to run function1() when scrollToTop and run function when scrollToBottom in flatlist. can i do that ?
<FlatList
data={data}
keyExtractor={(key) => key.id}
numColumns={2}
renderItem={({ item, index }) => {
return (
<View
style={{
alignItems: 'center',
justifyContent: 'center',
flex: 1,
marginTop: index == 0 || 1 ? 33 : 13,
paddingBottom: 20,
}}
>
{selectCard(item)}
</View>
);
}}
/>
thing what i want to do that, when i want to scrolldown in flatlist, i want to hide top bar and when i want to scrollup i want to show top bar.
question from:
https://stackoverflow.com/questions/65916939/react-native-flatlist-run-function-when-scrooltotop-or-scrooltobottom 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…