Gathering detailed insights and metrics for react-native-swipe-list-view
Gathering detailed insights and metrics for react-native-swipe-list-view
Gathering detailed insights and metrics for react-native-swipe-list-view
Gathering detailed insights and metrics for react-native-swipe-list-view
npm install react-native-swipe-list-view
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2,788 Stars
551 Commits
525 Forks
37 Watching
82 Branches
56 Contributors
Updated on 27 Nov 2024
JavaScript (89.26%)
Java (5.54%)
Objective-C (4.01%)
Ruby (0.66%)
Starlark (0.53%)
Cumulative downloads
Total Downloads
Last day
-0.6%
8,635
Compared to previous day
Last week
4.6%
46,506
Compared to previous week
Last month
9.1%
193,335
Compared to previous month
Last year
7.2%
2,206,936
Compared to previous year
<SwipeListView>
is a vertical ListView with rows that swipe open and closed. Handles default native behavior such as closing rows when ListView is scrolled or when other rows are opened.
Also includes <SwipeRow>
if you want to use a swipeable row outside of the <SwipeListView>
🔥🔥 BREAKING CHANGES 🔥🔥
For use with RN 0.60+ please use react-native-swipe-list-view@2.0.0+
RN 0.60 and RNSLV 2.0.0 deprecate the use of ListView entirely, please see example.js
for examples and see the migrating-to-flatlist doc for a migration guide if you aren't already using FlatList
.
The useFlatList
prop is no longer required, as FlatList
is the default ListView used.
Try it out! https://snack.expo.io/@jemise111/react-native-swipe-list-view
1npm install --save react-native-swipe-list-view
The application under ./SwipeListExample will produce the above example. To run execute the following:
git clone https://github.com/jemise111/react-native-swipe-list-view.git
cd react-native-swipe-list-view
cd SwipeListExample
yarn
cd ios
pod install
cd ..
react-native run-ios | react-native run-android
Android: If you get the following error
SwipeListExample/android/app/debug.keystore' not found for signing config 'debug'.
:1cd android/app/ && keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 2// answer the questions 3cd ../..
1import { SwipeListView } from 'react-native-swipe-list-view'; 2 3//... note: your data array objects MUST contain a key property 4// or you must pass a keyExtractor to the SwipeListView to ensure proper functionality 5// see: https://reactnative.dev/docs/flatlist#keyextractor 6 7 this.state.listViewData = Array(20) 8 .fill("") 9 .map((_, i) => ({ key: `${i}`, text: `item #${i}` })); 10 11//... 12render() { 13 return ( 14 <SwipeListView 15 data={this.state.listViewData} 16 renderItem={ (data, rowMap) => ( 17 <View style={styles.rowFront}> 18 <Text>I am {data.item.text} in a SwipeListView</Text> 19 </View> 20 )} 21 renderHiddenItem={ (data, rowMap) => ( 22 <View style={styles.rowBack}> 23 <Text>Left</Text> 24 <Text>Right</Text> 25 </View> 26 )} 27 leftOpenValue={75} 28 rightOpenValue={-75} 29 /> 30 ) 31}
See example.js
for full usage guide (including using <SwipeRow>
by itself)
If your row is touchable (TouchableOpacity, TouchableHighlight, etc.) with an onPress
function make sure renderItem
returns the Touchable as the topmost element.
GOOD:
1renderItem={ data => ( 2 <TouchableHighlight onPress={this.doSomething.bind(this)}> 3 <View> 4 <Text>I am {data.item} in a SwipeListView</Text> 5 </View> 6 </TouchableHighlight> 7)}
BAD:
1renderItem={ data => ( 2 <View> 3 <TouchableHighlight onPress={this.doSomething.bind(this)}> 4 <Text>I am {data.item} in a SwipeListView</Text> 5 </TouchableHighlight> 6 </View> 7)}
SwipeListView
now supports FlatList
and SectionList
! (as of v1.0.0)
Please see the migrating-to-flatlist doc for all details.
And see example.js
for a full usage example.
docs/
for help withexamples/
folder for examples onRN Core added a SwipeList component as of v0.27.0 It is actively being worked on and has no documentation yet. So I will continue to maintain this component until a future date.
MIT
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 1/17 approved changesets -- score normalized to 0
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
Reason
project is not fuzzed
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
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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