{"id":23715456,"url":"https://github.com/orzhtml/react-native-orzhtml-listview","last_synced_at":"2025-09-03T19:32:29.499Z","repository":{"id":57338840,"uuid":"198399381","full_name":"orzhtml/react-native-orzhtml-listview","owner":"orzhtml","description":"FlatList with pull-to-refresh and infinite scrolling for Android and iOS React-Native apps.  基于FlatList的上拉、下拉刷新组件","archived":false,"fork":false,"pushed_at":"2023-03-21T06:58:29.000Z","size":516,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-24T06:33:36.906Z","etag":null,"topics":["android","flatlist","ios","listiview","react-native"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orzhtml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-23T09:36:27.000Z","updated_at":"2023-07-29T22:49:06.000Z","dependencies_parsed_at":"2022-09-01T21:01:13.397Z","dependency_job_id":null,"html_url":"https://github.com/orzhtml/react-native-orzhtml-listview","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-listview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-listview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-listview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-listview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orzhtml","download_url":"https://codeload.github.com/orzhtml/react-native-orzhtml-listview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231913894,"owners_count":18445009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","flatlist","ios","listiview","react-native"],"created_at":"2024-12-30T20:56:33.128Z","updated_at":"2024-12-30T20:56:33.732Z","avatar_url":"https://github.com/orzhtml.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-orzhtml-listview\n\nFlatList with pull-to-refresh and infinite scrolling for Android and iOS React-Native apps.\n\n基于FlatList的上拉、下拉刷新组件。\n\n![](https://raw.githubusercontent.com/orzhtml/react-native-orzhtml-listview/master/1.gif)\n\n## Install\n\n\n`npm install react-native-orzhtml-listview --save`\n\nor\n\n`yarn add react-native-orzhtml-listview`\n\n\n## Props\n\nProp | Description | Type | Required/Default\n------ | ------ | ------ | ------\n`initialNumToRender`|首屏加载数量|`number`|`10`\n`refreshable`|是否可刷新|`bool`|`true`\n`setRefreshing`|刷新状态回调方法|`func`|`null`\n`setRefresh`|刷新方法|`func`|`null`\n`setEndReached`|加载更多方法|`func`|`null`\n`noRefresh`|下拉是否是刷新|`bool`|`false`\n`renderItem`|渲染项目|`func`|`null`\n`PaginationBtnView`|分页按钮视图|`func`|`null`\n`PaginationFetchingView`|分页拖动视图|`func`| `null`\n`PaginationAllLoadedView`|分页加载完成视图|`func`|`null`\n`PaginationWaitingView`|分页加载中视图|`func`|`null`\n`EmptyView`|空内容视图|`func`|`null`\n`HeaderView`|头部视图|`func`|`null`\n`refreshableTitle`|可刷新的标题|`string`|`null`\n`refreshableColors`|可刷新的颜色|`array`| `['dimgray', 'tomato', 'limegreen']`\n`refreshableProgressBackgroundColor`|可刷新的进展背景颜色|`string`|`#fff`\n`refreshableSize`|可刷新的大小|`string`|`null`\n`refreshableTintColor`|可刷新的色调的颜色|`string`|`lightgray`\n`customRefreshControl`|自定义刷新控制|`func`| `null`\n`pagination`|是否显示分页|`bool`|`true`\n`allLoadedText`|加载完成文字|`string`|`End of List`\n`spinnerColor`|等待加载动画的颜色|`string`|`undefined`\n`waitingSpinnerSize`|等待加载动画的大小|`string`|`small`\n`waitingSpinnerText`|等待加载的文案|`string`|`Loading...`\n`paginationBtnText`|分页按钮文案|`string`|`Load more...`\n`emptyViewText`|空视图的文案|`string`|`Sorry no data`\n\n## handle ref\n\nmethod | description\n------ | ----------\n`firstAddData` | 第一次数据加载\n`updateDataSource` | 手动更新数据\n`refresh` | 手动刷新\n`getRows` | 获取已存的所有数据\n`scrollToEnd` | 滚动到底部: 参考 FlatList scrollToEnd\n`scrollToIndex` | 将位于指定位置的元素滚动到可视区的指定位置: 参考 FlatList scrollToIndex\n`scrollToItem` | 这个方法会顺序遍历元素。尽可能使用 scrollToIndex 代替: 参考 FlatList scrollToItem\n`scrollToOffset` | 滚动列表到指定的偏移（以像素为单位），等同于 ScrollView 的 scrollTo 方法: 参考 FlatList scrollToOffset\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-listview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forzhtml%2Freact-native-orzhtml-listview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-listview/lists"}