1.0.0 • Published 7 years ago

react-native-dj-swipe-list-view v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

react-native-dj-swipe-list-view

Install

npm install --save react-native-dj-swipe-list-view

Usage

Using in your app will usually look like this:

import { SwipeListView } from 'react-native-dj-swipe-list-view';

render() {
    const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
    return (
        <SwipeListView
            dataSource={ds.cloneWithRows(dataSource)}
            renderRow={ data => (
                <View style={styles.rowFront}>
                    <Text>I am {data} in a SwipeListView</Text>
                </View>
            )}
            renderHiddenRow={ data => (
                <View style={styles.rowBack}>
                    <Text>Left</Text>
                    <Text>Right</Text>
                </View>
            )}
            leftOpenValue={75}
            rightOpenValue={-75}
        />
    )
}

Props

The following props can be used to modify the style and/or behaviour:

PropTypeOpt/RequiredDefaultNote
closeOnRowPressbooleanOptiontrueShould open rows be closed when a row is pressed

Methods

The following methods can be used to open and close the Dialog:

MethodParametersNote