Skip to content

Commit ba3c7ef

Browse files
sscaff1Facebook Github Bot 4
authored andcommitted
Fix the getRowData method of SwipeableListViewDataSource in SwipeableListView
Summary: 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
1 parent 3a24c63 commit ba3c7ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Experimental/SwipeableRow/SwipeableListView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const SwipeableListView = React.createClass({
5252
statics: {
5353
getNewDataSource(): Object {
5454
return new SwipeableListViewDataSource({
55-
getRowData: (data, sectionID, rowID) => data[rowID],
55+
getRowData: (data, sectionID, rowID) => data[sectionID][rowID],
5656
getSectionHeaderData: (data, sectionID) => data[sectionID],
5757
sectionHeaderHasChanged: (s1, s2) => s1 !== s2,
5858
rowHasChanged: (row1, row2) => row1 !== row2,

0 commit comments

Comments
 (0)