react-native - React native: Is it possible to set initial position to SectionList without using scrollToLocation
问题描述
I want to set an initial list position (SectionList) without using scrollToLocation. Is that possible? tried to look it up but couldn't fund anything about it.
Thanks in advance.
解决方案
不,这是不可能的。
我能想到的一个解决方案是你 set initialNumToRender
,其中有那个初始位置。但这在处理大型列表时会导致内存问题。
另一种解决方法是在列表上方显示一个加载器并在scrollToLocation
没有动画的情况下使用。然后隐藏加载器。
推荐阅读
- flutter - 无法在新的 dart 文件中导入 dart 文件(URI 的目标不存在)
- postgresql - 使用 postgresql 计算 CIDR 网络掩码
- c# - 在我的课堂上摆脱重复 if 语句的建议
- reactjs - (reactjs) useEffect 没有在后台运行
- python-3.x - 如何在正则表达式python中用相同数量的不同字符替换重复字符?
- java - 单独列表
在爪哇 - angular - 将接口类型数据分配给一类默认属性
- java - JPA @Converter 未被拾取进行转换
- reactjs - Apache 重写规则不适用于 HTTPS(反应路由器)
- python - 解码字节序列 - 这样做的思路是什么