Permalink
Browse files

Update SwipeableListView props and more

Summary: Update the props to allow not passing in an onScroll callback

Reviewed By: zjj010104

Differential Revision: D4604474

fbshipit-source-id: 9371776d1451f7bd0247fbafaf4bf7198291d1b1
  • Loading branch information...
fred2028 authored and facebook-github-bot committed Feb 23, 2017
1 parent bac24dd commit 395122354f00483673fdaf5aec8c1e15e59d617b
Showing with 3 additions and 3 deletions.
  1. +3 −3 Libraries/Experimental/SwipeableRow/SwipeableListView.js
@@ -34,7 +34,7 @@ type Props = {
bounceFirstRowOnMount: boolean,
dataSource: SwipeableListViewDataSource,
maxSwipeDistance: number | (rowData: any, sectionID: string, rowID: string) => number,
onScroll: ?Function,
onScroll?: ?Function,
renderRow: Function,
renderQuickActions: Function,
};
@@ -167,13 +167,13 @@ class SwipeableListView extends React.Component {
}
// This enables rows having variable width slideoutView.
_getMaxSwipeDistance = (rowData: Object, sectionID: string, rowID: string): number => {
_getMaxSwipeDistance(rowData: Object, sectionID: string, rowID: string): number {
if (typeof this.props.maxSwipeDistance === 'function') {
return this.props.maxSwipeDistance(rowData, sectionID, rowID);
}
return this.props.maxSwipeDistance;
};
}
_renderRow = (rowData: Object, sectionID: string, rowID: string): React.Element<any> => {
const slideoutView = this.props.renderQuickActions(rowData, sectionID, rowID);

0 comments on commit 3951223

Please sign in to comment.