Skip to content

Commit

Permalink
Fix the getRowData method of SwipeableListViewDataSource in Swipeable…
Browse files Browse the repository at this point in the history
…ListView

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
  • Loading branch information
sscaff1 authored and Facebook Github Bot 4 committed Jul 6, 2016
1 parent 3a24c63 commit ba3c7ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Experimental/SwipeableRow/SwipeableListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ba3c7ef

Please sign in to comment.