Installations
npm install react-drag-listview
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
11.15.0
NPM Version
6.7.0
Score
95.1
Supply Chain
99.6
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
raisezhang
Download Statistics
Total Downloads
4,974,300
Last Day
7,009
Last Week
29,334
Last Month
141,990
Last Year
1,772,297
GitHub Statistics
241 Stars
73 Commits
5 Forks
2 Watching
3 Branches
9 Contributors
Bundle Size
25.76 kB
Minified
8.48 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.0.0
Package Id
react-drag-listview@2.0.0
Unpacked Size
339.96 kB
Size
77.20 kB
File Count
15
NPM Version
6.7.0
Node Version
11.15.0
Publised On
10 Jan 2023
Total Downloads
Cumulative downloads
Total Downloads
4,974,300
Last day
-10.6%
7,009
Compared to previous day
Last week
-27.2%
29,334
Compared to previous week
Last month
-39.1%
141,990
Compared to previous month
Last year
45.6%
1,772,297
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
5
react-drag-listview
React drag list component.
install
Use on mobile (touch) devices
react-drag-listview
already supports mobile (touch) devices, which can be easily implemented based on the dragdroptouch polyfill- Need to manually add polyfill
dragdroptouch
to your website. e.g.1<script id="DragDropTouch" src="https://bernardo-castilho.github.io/DragDropTouch/DragDropTouch.js"></script>
- Example: Drag on mobile devices
Example
-
Drag Rows
-
Drag Columns
Development
1npm install 2npm start
Usage
1const ReactDragListView = require('react-drag-listview'); 2 3class Demo extends React.Component { 4 constructor(props) { 5 super(props); 6 7 const data = []; 8 for (let i = 1, len = 7; i < len; i++) { 9 data.push({ 10 title: `rows${i}` 11 }); 12 } 13 14 this.state = { 15 data 16 }; 17 } 18 19 render() { 20 const that = this; 21 const dragProps = { 22 onDragEnd(fromIndex, toIndex) { 23 const data = [...that.state.data]; 24 const item = data.splice(fromIndex, 1)[0]; 25 data.splice(toIndex, 0, item); 26 that.setState({ data }); 27 }, 28 nodeSelector: 'li', 29 handleSelector: 'a' 30 }; 31 32 return ( 33 <ReactDragListView {...dragProps}> 34 <ol> 35 {this.state.data.map((item, index) => ( 36 <li key={index}> 37 {item.title} 38 <a href="#">Drag</a> 39 </li> 40 ))} 41 </ol> 42 </ReactDragListView> 43 ); 44 } 45} 46
API
Properties
Name | Type | Default | Description |
---|---|---|---|
onDragEnd | Function(fromIndex, toIndex) | on drag end callback, required | |
nodeSelector | String | tr | get drag item cssQuery |
handleSelector | String | nodeSelector | get drag handle cssQuery |
ignoreSelector | String | ignore node list | |
enableScroll | Boolean | true | whether use auto scroll for dragging |
scrollSpeed | Number | 10 | scroll speed |
lineClassName | String | get dragLine's className, css properties must be use !important |
License
react-drag-listview is released under the MIT license.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
Reason
0 existing vulnerabilities detected
Reason
Found 7/21 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 16 are checked with a SAST tool
Score
3.4
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-drag-listview
react-native-sortable-listview
Drag drop capable wrapper of ListView for React Native
aim-react-drag-listview
copy react-drag-listview
react-drag-listview-handleissue
drag list view and table view component for react
@kesho/react-drag-listview
drag list view and table view component for react