Gathering detailed insights and metrics for @nvthai/react-native-swipe-list-view
Gathering detailed insights and metrics for @nvthai/react-native-swipe-list-view
Gathering detailed insights and metrics for @nvthai/react-native-swipe-list-view
Gathering detailed insights and metrics for @nvthai/react-native-swipe-list-view
A React Native ListView component with rows that swipe open and closed
npm install @nvthai/react-native-swipe-list-view
Typescript
Module System
43.7
Supply Chain
57.4
Quality
65.7
Maintenance
50
Vulnerability
94.1
License
JavaScript (71.68%)
TypeScript (16.06%)
Objective-C (6.65%)
Python (3.33%)
Java (2.29%)
Total Downloads
10,867
Last Day
1
Last Week
21
Last Month
84
Last Year
1,489
MIT License
341 Commits
49 Branches
1 Contributors
Updated on Sep 09, 2019
Latest Version
1.5.16
Package Id
@nvthai/react-native-swipe-list-view@1.5.16
Unpacked Size
82.61 kB
Size
18.04 kB
File Count
23
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
61.5%
21
Compared to previous week
Last Month
16.7%
84
Compared to previous month
Last Year
-27.4%
1,489
Compared to previous year
3
2
<SwipeListView>
is a 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>
Try it out! https://snack.expo.io/@jemise111/react-native-swipe-list-view
1npm install --save @nvthai/react-native-swipe-list-view
The application under ./SwipeListExample will produce the above example. To run execute the following:
git clone https://github.com/nvthai/react-native-swipe-list-view.git
cd react-native-swipe-list-view
cd SwipeListExample
yarn
react-native run-ios | react-native run-android
1import { SwipeListView } from 'react-native-swipe-list-view'; 2 3render() { 4 return ( 5 <SwipeListView 6 useFlatList 7 data={this.state.listViewData} 8 renderItem={ (data, rowMap) => ( 9 <View style={styles.rowFront}> 10 <Text>I am {data.item} in a SwipeListView</Text> 11 </View> 12 )} 13 renderHiddenItem={ (data, rowMap) => ( 14 <View style={styles.rowBack}> 15 <Text>Left</Text> 16 <Text>Right</Text> 17 </View> 18 )} 19 leftOpenValue={75} 20 rightOpenValue={-75} 21 /> 22 ) 23}
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.
You can continue to use the (deprecated) ListView
component, however there are some BREAKING CHANGES that are explained in that doc as well
RN 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.