Browse files

Fix the getRowData method of SwipeableListViewDataSource in Swipeable…


This is simple fix to SwipeableListView. According to SwipeableListViewDataSource, the only method available is cloneWithRowsAndSections. If you try to get the data from a SwipeableListView, without this fix it won't work. This change fixes the problem so that SwipeableListView can work correctly.
Closes #8493

Differential Revision: D3523384

fbshipit-source-id: 359ff274fabcab676ed6dee24f0652c4146cde69
  • Loading branch information...
1 parent 3a24c63 commit ba3c7ef08c8b0ff2457b0efd8f1a2998a3eb44f7 @sscaff1 sscaff1 committed with Facebook Github Bot 4 Jul 6, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 Libraries/Experimental/SwipeableRow/SwipeableListView.js
@@ -52,7 +52,7 @@ const SwipeableListView = React.createClass({
statics: {
getNewDataSource(): Object {
return new SwipeableListViewDataSource({
- getRowData: (data, sectionID, rowID) => data[rowID],
+ getRowData: (data, sectionID, rowID) => data[sectionID][rowID],
getSectionHeaderData: (data, sectionID) => data[sectionID],
sectionHeaderHasChanged: (s1, s2) => s1 !== s2,
rowHasChanged: (row1, row2) => row1 !== row2,

0 comments on commit ba3c7ef

Please sign in to comment.