RC, fix cant refresh in campaign list view

Reviewed By: hedgerwang

Differential Revision: D3966351

fbshipit-source-id: 20b1621dd26c57f6367f9d2eab0be3661dee1843
This commit is contained in:
Chace Liang 2016-10-04 11:41:19 -07:00 committed by Facebook Github Bot
parent 20ef20591f
commit 5eb28dc4f0
1 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,7 @@ type Props = {
bounceFirstRowOnMount: boolean,
dataSource: SwipeableListViewDataSource,
maxSwipeDistance: number,
onScroll: ?Function,
renderRow: Function,
renderQuickActions: Function,
};
@ -131,13 +132,14 @@ class SwipeableListView extends React.Component {
);
}
_onScroll = (): void => {
_onScroll = (e): void => {
// Close any opens rows on ListView scroll
if (this.props.dataSource.getOpenRowID()) {
this.setState({
dataSource: this.state.dataSource.setOpenRowID(null),
});
}
this.props.onScroll && this.props.onScroll(e);
}
/**