Gathering detailed insights and metrics for @cnakazawa/react-native-sortable-listview
Gathering detailed insights and metrics for @cnakazawa/react-native-sortable-listview
Gathering detailed insights and metrics for @cnakazawa/react-native-sortable-listview
Gathering detailed insights and metrics for @cnakazawa/react-native-sortable-listview
Drag drop capable wrapper of ListView for React Native
npm install @cnakazawa/react-native-sortable-listview
Typescript
Module System
Node Version
NPM Version
39.4
Supply Chain
53.7
Quality
65.2
Maintenance
50
Vulnerability
94.1
License
JavaScript (73.29%)
Objective-C (15.85%)
Starlark (5.88%)
Java (4.98%)
Total Downloads
855
Last Day
1
Last Week
6
Last Month
24
Last Year
189
MIT License
916 Stars
121 Commits
234 Forks
10 Watchers
20 Branches
27 Contributors
Updated on Jan 14, 2025
Latest Version
0.3.0
Package Id
@cnakazawa/react-native-sortable-listview@0.3.0
Unpacked Size
22.28 kB
Size
7.17 kB
File Count
5
NPM Version
6.5.0
Node Version
11.6.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-14.3%
6
Compared to previous week
Last Month
71.4%
24
Compared to previous month
Last Year
25.2%
189
Compared to previous year
Drag drop capable wrapper of ListView for React Native. Allows for dragging and dropping of rows with automatic scrolling while dragging.
npm install react-native-sortable-listview --save
import SortableListView from 'react-native-sortable-listview'
See example.
See Sortable.
SortableListView passes through all the standard ListView properties to ListView, except for dataSource. The renderRow method must render a component that forwards onLongPress and onPressOut methods to a Touchable* child component. Calling the onLongPress method will enable the drag and drop on the row and onPressOut will cancel it. You can also apply the default behaviour by spreading the sortHandlers prop (e.g. <TouchableHightlight {...this.props.sortHandlers} >..
)
onRowMoved
(Function) - should return a function that is passed a single object when a row is dropped. The object contains three properties from
, to
, and row
. from
and to
are the order indexes being requested to move. row
is all the info available about the row being dropped.data
(Object) - Takes an object.rowHasChanged
(Function) - Takes an function that is called to compare row data. It is passed the new row data and a shallow copy of the previous row data. This is necessary to define if row data is not immutible for row changes to correctly propagate, if your row data is immutable DO NOT DEFINE, see #28 for reasons why.order
(Array) (optional) - Expects an array of keys to determine the current order of rows.sortRowStyle
(Object) (optional) - Expects a style
object, which is to be applied on the rows when they're being dragged.disableSorting
_(boolean) (optional) - When set to true, all sorting will be disabled, which will effectively make the SortableListView act like a normal ListView.onMoveStart
(Function) (Optional) - Register a handler to be called when drag start.onMoveEnd
(Function) (Optional) - Register a handler to be called when move is completed.onRowActive
(Function) (Optional) - Register a handler to be called when row is activated, return a object contains three properties rowData
, touch
and layout
. rowData
is the data info of activated row, layout
is the layout info of the activated row, touch
is the nativeEvent
of long pressonMoveCancel
(Function) (Optional) - Register a handler to be called when move is canceled, that is the row is activated on long press and then released without any move.activeOpacity
(Number) (Optional) - Sets opacity of an active element. Default value: 0.2
.limitScrolling
_(boolean) (optional) - When set to true, scrolling will be disabled when a row is active (sorting). Default is false
.moveOnPressIn
_(boolean) (optional) - When set to true, longPress delay is eliminated. Default is false
.ListViewComponent
_(Function) (optional) - A custom ListView component to be used instead of React-Native's ListView.disableAnimatedScrolling
_(boolean) (optional) - When set to true, scrolling will no longer animate. Default is false
. Strongly recommend set it to true
., see #97 for more context.scrollTo(...args)
- Scrolls to a given x, y offset, either immediately or with a smooth animation. See ScrollView's scrollTo method.Before submitting a PR, please:
npm run prettier
.npm run test
. (Currently this produces 2 warnings, no errors).Unreleased
section of the Changelog.MIT Licensed
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 10/29 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
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
91 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-12
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 More