Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 财产';滚动索引';不存在于类型';平面列表<&燃气轮机';_Typescript_React Native - Fatal编程技术网

Typescript 财产';滚动索引';不存在于类型';平面列表<&燃气轮机';

Typescript 财产';滚动索引';不存在于类型';平面列表<&燃气轮机';,typescript,react-native,Typescript,React Native,我想了解此警告/错误的原因:类型“FlatList”上不存在“Property”scrollToIndex 我有一个本地快照转盘列表,应该在快照上滚动另一个列表 我为要滚动的列表创建了一个ref,该列表使用constschoorlist=useRef(null)进行滚动 用户使用ref={schoolList} 我的旋转木马是这样做的: <BottomCarousel ... onSnapToItem={(index) => { schoolList.current?

我想了解此警告/错误的原因:
类型“FlatList”上不存在“Property”scrollToIndex

我有一个本地快照转盘列表,应该在快照上滚动另一个列表

我为要滚动的列表创建了一个ref,该列表使用
constschoorlist=useRef(null)进行滚动
用户使用
ref={schoolList}
我的旋转木马是这样做的:

<BottomCarousel
  ...
  onSnapToItem={(index) => {
    schoolList.current?.scrollToIndex({ animated: false, index });
  }}
/>
{
schoolList.current?.scrollToIndex({animated:false,index});
}}
/>
我得到的错误在这一行:
schoolList.current?.scrollToIndex({animated:false,index})

所以我做了一些挖掘<代码>滚动索引
用于平面列表。 我错过了什么