Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Libraries/Experimental/SwipeableRow/SwipeableFlatList.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,7 @@ const FlatList = require('FlatList');
// TODO: Make this $ReadOnly and Exact. Will require doing the same to the props in
// Libraries/Lists/*
type SwipableListProps = {
preventSwipeRight: boolean,
/**
* To alert the user that swiping is possible, the first row can bounce
* on component mount.
Expand DownExpand Up@@ -66,6 +67,7 @@ class SwipeableFlatList<ItemT> extends React.Component<Props<ItemT>, State> {

static defaultProps = {
...FlatList.defaultProps,
preventSwipeRight: false,
bounceFirstRowOnMount: true,
renderQuickActions: () => null,
};
Expand All@@ -88,7 +90,7 @@ class SwipeableFlatList<ItemT> extends React.Component<Props<ItemT>, State> {
}}
onScroll={this._onScroll}
renderItem={this._renderItem}
extraData={this.state}
extraData={this.state.openRowKey}
/>
);
}
Expand DownExpand Up@@ -121,6 +123,7 @@ class SwipeableFlatList<ItemT> extends React.Component<Props<ItemT>, State> {

return (
<SwipeableRow
preventSwipeRight={this.props.preventSwipeRight}
slideoutView={slideoutView}
isOpen={key === this.state.openRowKey}
maxSwipeDistance={this._getMaxSwipeDistance(info)}
Expand Down