React native Can';t形卷轴平面列表在重新激活的底页内

React native Can';t形卷轴平面列表在重新激活的底页内,react-native,React Native,我已经将包react native reactimated bottom sheet导入到我的项目中,以创建bottom sheet行为。在它里面我创建了Faltlist,这样我就可以有不同的项目(几乎12个项目)并在其中滚动,问题是底部的工作表打开了,但我无法在其中滚动 这些是我只有测试的项目,我想在底页滚动它们 const DATA = [ { id: "bd7acbea-c1b1-46c2-aed5-3ad53abb28ba", title: "First

我已经将包
react native reactimated bottom sheet
导入到我的项目中,以创建bottom sheet行为。在它里面我创建了
Faltlist
,这样我就可以有不同的项目(几乎12个项目)并在其中滚动,问题是底部的工作表打开了,但我无法在其中滚动

这些是我只有测试的项目,我想在底页滚动它们

const DATA = [
    {
      id: "bd7acbea-c1b1-46c2-aed5-3ad53abb28ba",
      title: "First Item"
    },
    {
      id: "3ac68afc-c605-48d3-a4f8-fbd91aa97f63",
      title: "Second Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-145571e29d72",
      title: "Third Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-245571e29d72",
      title: "Third Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-345571e29d72",
      title: "Third Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-445571e29d72",
      title: "Third Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-745571e29d72",
      title: "Third Item"
    },
    {
      id: "58694a0f-3da1-471f-bd96-845571e29d72",
      title: "fourth Item"
    }
  ];
我的工作表代码是这样的,它在
showCarTypesModal
变为真后显示

     { showCarTypesModal == true && 
            <BottomSheet
              snapPoints = {[450, 300, 0]}
              renderContent = { () => 
                <View style={{ backgroundColor: "white" }}>
                <FlatList
                data={DATA}
                renderItem={({ item }) =>  <View style={{height: 80, width: "100%"}}><Text style={{color: "blue"}}> {item.title} </Text></View> }
                keyExtractor={item => item.id}
                />
                </View>
              }
            />
          }
{showCarTypesModal==true&&
{item.title}
keyExtractor={item=>item.id}
/>
}
/>
}

我认为您的容器应该有flex:1

            <BottomSheet
              renderContent = { () => 
                <View style={{ flex:1 backgroundColor: "white" }}>
                <FlatList
                ..../>
                </View>
              }
            />

}
/>

设置底板支柱如下:

enabledInnerScrolling={true}
enabledContentGestureInteraction={false}

这不是一个真正的答案,但到目前为止,这里的解决方案仍然有很多问题,不能正常工作

我可以推荐另一个组件,它也支持虚拟化,以60 FPS的速度制作本地动画,并与FlatList、ScrollView和SectionList集成

以下是组件:

使用核心
平面列表的示例:

从“React”导入React;
从“react native”导入{维度、样式表、文本、视图};
从“react native scroll bottom sheet”导入scroll BottomSheet;
const windowHeight=Dimensions.get('window').height;
函数示例(){
返回(
(
)}
data={Array.from({length:200}).map({uu,i)=>String(i))}
keyExtractor={i=>i}
renderItem={({item})=>(
{`Item${Item}`}
)}
contentContainerStyle={styles.contentContainerStyle}
/>
);
}
const styles=StyleSheet.create({
容器:{
弹性:1,
},
contentContainerStyle:{
填充:16,
背景颜色:“#F3F4F9”,
},
标题:{
对齐项目:“居中”,
背景颜色:“白色”,
填充垂直:20,
borderTopLeftRadius:20,
BorderTopRight半径:20
},
面板手柄:{
宽度:40,
身高:2,
背景颜色:“rgba(0,0,0,0.3)”,
边界半径:4
},
项目:{
填充:20,
为内容辩护:“中心”,
背景颜色:“白色”,
对齐项目:“居中”,
玛吉:10,
},
});

它是在2020年5月4日发布的。

你解决了这个问题吗?不,我无法解决它。@Tarekhasan我正在尝试使用
map
但它仍然无法向下滚动,你找到了解决方案吗!有解决这个问题的更新吗?没有,我必须切换到另一个组件