Skip to content

Instantly share code, notes, and snippets.

@chirag04
Last active December 17, 2017 03:44
Show Gist options
  • Save chirag04/65134da80af3c2ef00fff8b39521a818 to your computer and use it in GitHub Desktop.
Save chirag04/65134da80af3c2ef00fff8b39521a818 to your computer and use it in GitHub Desktop.
import SwipeableListView from 'SwipeableListView'
class SwipeableListView extends React.Component {
constructor(props) {
super(props);
this.ds = SwipeableListView.getNewDataSource();
}
render() {
const data = { s1: [ {id: 1, name: 'a'}, {id: 2, name: 'b'}];
return (
<SwipeableListView
renderRow={YOUR RENDER ROW FUNCTION}
renderQuickActions={YOUR SWIPEABLE ROW FUNCTION}
dataSource={this.ds.cloneWithRowsAndSections(data, null, null)}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment