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

标签 ios listview react-native

我想在 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/

相关文章:

java - ListView : getHeight() on a null object reference

android - ListActivities setItemChecked 在 onListItemClick 中不起作用

android - React-Native Android - 找不到 com.android.tools :common

react-native - 使用 axios 在 react-native 中添加全局微调器

java - Android - 处理适配器中的监听器

javascript - <AnimatedComponent/> 的快照测试在 react native 和 Jest 中失败

ios - swift PFQueryTableViewController - 在呈现单元格之前删除重复的对象

html - 在 iPad 中边距居中的按钮向左移动

ios - 在应用程序更新期间在哪里持久存储用户数据(iOS)?

ios - 在不知道它们是 IPv4 还是 IPv6 的情况下预创建套接字