gpt4 book ai didi

ios - ListView 部分数据(react-native)

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:16:30 24 4
gpt4 key购买 nike

我想在 react-native 中创建一个类似于 UIExplorerApp 中的 ListViewPagingExample 的两层(部分 >> 条目) ListView ,但使用 blob 数据/json 来填充部分信息。此外,我对将哪些参数值传递给 cloneWithRowsAndSections 感到困惑。

无法从文档 ( https://facebook.github.io/react-native/docs/listview.html#content ) 中找到有关上述主题的任何内容,但仅提及它是可能的。一些例子会有所帮助。

谢谢

最佳答案

您可以找到 ListViewDataSource 的源代码 here .

cloneWithRows 方法定义为:

cloneWithRows(
dataBlob: Array<any> | {[key: string]: any},
rowIdentities: ?Array<string>
)

而 cloneWithRowsAndSections 是:

cloneWithRowsAndSections( 数据 block :任何, sectionIdentities: ?数组, rowIdentities: ?数组>)

sectionIdentities 参数记录为:

This is an array of identifiers for sections. ie. ['s1', 's2', ...]. If not provided, it's assumed that the keys of dataBlob are the section identities.

关于ios - ListView 部分数据(react-native),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29382132/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com