reactjs - Flatlist scrolling freeze - Stack Overflow
I am using a FlatList
but I cannot scroll for some reason, It just seems frozen. I would try a few times and only after a while it would scroll. When the scrolling stopped same issue would occur, why?
container
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
<SafeAreaView className="h-screen bg-background px-6 pt-6">
<SegmentedControl
values={["Questions", "Duas"]}
selectedIndex={section}
tintColor="#009790"
fontStyle={{
color: "#464646",
}}
activeFontStyle={{
color: "#FFF",
}}
onValueChange={() =>
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)
}
backgroundColor="#FFF"
onChange={(event) => {
setSection(event.nativeEvent.selectedSegmentIndex);
}}
style={{
height: 50,
borderCurve: "circular",
}}
/>
{section == 0 ? <QAPage /> : <DuaPage />}
</SafeAreaView>
</TouchableWithoutFeedback>
FlatList
<FlatList
className={"flex-1 w-full mt-6 gap-4 pb-20"}
showsVerticalScrollIndicator={false}
ItemSeparatorComponent={() => <View className="h-5" />}
data={data}
renderItem={({ item }) => <DuaComponent item={item} />}
/>
I am using a FlatList
but I cannot scroll for some reason, It just seems frozen. I would try a few times and only after a while it would scroll. When the scrolling stopped same issue would occur, why?
container
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
<SafeAreaView className="h-screen bg-background px-6 pt-6">
<SegmentedControl
values={["Questions", "Duas"]}
selectedIndex={section}
tintColor="#009790"
fontStyle={{
color: "#464646",
}}
activeFontStyle={{
color: "#FFF",
}}
onValueChange={() =>
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)
}
backgroundColor="#FFF"
onChange={(event) => {
setSection(event.nativeEvent.selectedSegmentIndex);
}}
style={{
height: 50,
borderCurve: "circular",
}}
/>
{section == 0 ? <QAPage /> : <DuaPage />}
</SafeAreaView>
</TouchableWithoutFeedback>
FlatList
<FlatList
className={"flex-1 w-full mt-6 gap-4 pb-20"}
showsVerticalScrollIndicator={false}
ItemSeparatorComponent={() => <View className="h-5" />}
data={data}
renderItem={({ item }) => <DuaComponent item={item} />}
/>
Share
Improve this question
edited 22 hours ago
RakibulB
asked 22 hours ago
RakibulBRakibulB
1256 bronze badges
1 Answer
Reset to default 1The issue was that my FlatList
component was inside a TouchableWithoutFeedback
component, causing weird issues when scrolling,
最新文章
- 谷歌回应欧盟反垄断指控:安卓利于竞争和消费者
- Windows 10盗版不易?所以在中国普及速度极慢
- 百度地图打造移动互联网的大世界和微生活
- 移动互联网生态基石平台的吸引力分析
- 思科宣布27亿美元收购安全软件厂商Sourcefire
- 分析称苹果本届WWDC将侧重软件 不会发布iPhone 5
- reactjs - LLM Endpoint hosted in Azure databricks Response 200 but body is locked - Stack Overflow
- python - Adding quotes to list objects to format as a dictionary pyspark - Stack Overflow
- Integration-testing a Spring Boot @Service without SpringBootApplication - Stack Overflow
- html - Audio tag working in Chrome but not Safari? - Stack Overflow
- python - DeltaTable map type - Stack Overflow
- java.lang.NoClassDefFoundError: Could not initialize class org.apache.spark.SparkThrowableHelper$ - Stack Overflow
- Web scraping using selenium-Google messages web - Stack Overflow
- c# - Getting "The signature key was not found" error when using JWT Bearer Authentication with Keycloak in ASP
- web - Framer Motion Scrollable - Stack Overflow
- keyboard - Issue with java.awt.Robot KeyEvent for Special Characters (e.g., : and ) - Stack Overflow
- reactjs - TypeError: The "payload" argument must be of type object. Received null on Next.js with Prisma and M