{"id":26474015,"url":"https://github.com/hzzcc/react-native-draggablelist","last_synced_at":"2025-08-09T23:33:05.364Z","repository":{"id":57336631,"uuid":"48773108","full_name":"hzzcc/react-native-draggablelist","owner":"hzzcc","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-11T12:31:43.000Z","size":303,"stargazers_count":26,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T14:39:59.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-draggablelist","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hzzcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-30T00:26:11.000Z","updated_at":"2020-07-01T13:57:18.000Z","dependencies_parsed_at":"2022-09-11T04:00:34.293Z","dependency_job_id":null,"html_url":"https://github.com/hzzcc/react-native-draggablelist","commit_stats":null,"previous_names":["hzzcc/react-native-dragablelist"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hzzcc/react-native-draggablelist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzzcc%2Freact-native-draggablelist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzzcc%2Freact-native-draggablelist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzzcc%2Freact-native-draggablelist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzzcc%2Freact-native-draggablelist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hzzcc","download_url":"https://codeload.github.com/hzzcc/react-native-draggablelist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzzcc%2Freact-native-draggablelist/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269653714,"owners_count":24454315,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-03-19T22:39:49.478Z","updated_at":"2025-08-09T23:33:05.274Z","avatar_url":"https://github.com/hzzcc.png","language":"JavaScript","funding_links":[],"categories":["组件"],"sub_categories":["ListView\u0026ScrollView"],"readme":"# react native draggableList\n\n## Demo\n    \n![demo](https://raw.githubusercontent.com/hzzcc/react-native-dragablelist/master/Image/example.gif)\n\n## How do I use it?\n    \n### Installation\n    \n    npm install react-native-draggablelist\n   \n### Use in your code\n\n    var DraggableList = require('react-native-draggablelist');\n\n    \u003cDraggableList\n            dataSource={this.state.dataSource}\n            component={Cell}\n            cellProps={/*your cell props*/}\n            onMove={this._onMove}\n            keys={this.state.keys}\n            shouldUpdateId={'2'}\n            onPressCell={this.onPressCell}\n            scrollStyle: {/*styles*/}, //scroll view style\n            contentInset: {}, //scroll view contentInset\n            \n            isScrollView: PropTypes.bool, //default true, \n            toggleScroll: PropTypes.func,\n            shouldUpdate: PropTypes.bool, //update all cell\n            /\u003e\n            \n    dataSource:     isRequired, array of your data include id, like [{id: '1', name: ''}, {id: '2', name: ''}]\n    component:      isRequired, your cell component\n    onMove:             callback function, return the orders of cell by id\n    keys:               you can also pass data orders, like ['2','1'], but it should be same with your data ids\n    shouldUpdateId:     the cell should be update\n    onPressCell:        when cell pressed \n    isScrollView:       is scrollView or view, \n    toggleScroll:       if isScrollView is false, and outside component is a scrollView, should set the callback for scrollEnabled state\n    shouldUpdate:       update all cell\n\n#### Simplest sample use is :\n            \n            \u003cDraggableList\n                 component={Cell}\n                 dataSource={Data}\n                 /\u003e\n    \n### Attention \n    \n    In your cell component, you should add below to your view \n    \n     \u003cView\u003e\n        {/* other views*/}\n        \u003cView {...this.props.dragHandlers} \u003e\n            {/* this is the rect you can drag*/}\n        \u003c/View\u003e\n        {/* other views*/}\n     \u003c/View\u003e\n     \n     this.props.rowData, you can get the data passed to cell, \n            \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzzcc%2Freact-native-draggablelist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhzzcc%2Freact-native-draggablelist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzzcc%2Freact-native-draggablelist/lists"}