react-native - ScrollToIndex 超出范围:请求索引 NaN,但最大值为 3 -- SwiperFlatList
问题描述
这是我的 swiperflatlist 组件,我在其中从 api 渲染图像,但是为什么我会收到这个错误,我不明白请告诉我为什么会收到这个错误?
index nan 应该但是组件被称为 flatlist 的映射?
<SwiperFlatList
autoplayDelay={2}
autoplay
autoplayLoop
index={0}
data={this.state.achhamall}
renderItem={({item}) => // Standard Image
<View style={[styles.child, { }]}>
<Image
style={{height:400, width: width , resizeMode:'contain'}}
source={{uri: item.image}}
/>
</View>
}
showPagination
/>
解决方案
推荐阅读
- php - 在内置服务器中指定 PHP 文件时,在验证之前更改随机 $_SESSION 令牌
- r - 在 R 中对多个数据集执行相同的操作
- groovy - Jmeter - 一起使用 url 编码和 groovy 函数
- java - 如何列出所有 WiFi 接入点?
- python - 如何从列表中创建一个类
- css - 使用 CSS :hover 旋转 SVG 元素会导致元素被翻译
- javascript - useState 未按预期呈现
- flutter - Flutter 集成测试:我无法定位我的一些小部件 - 找不到 Getter
- asp.net-core - 如何在 minikube 本地为 asp.net 核心应用程序的部署 yaml 文件配置 https?
- c++ - 继承类的构造函数没有运行