From ba3c7ef08c8b0ff2457b0efd8f1a2998a3eb44f7 Mon Sep 17 00:00:00 2001 From: Steven Scaffidi Date: Wed, 6 Jul 2016 11:53:05 -0700 Subject: [PATCH] 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 https://github.com/facebook/react-native/pull/8493 Differential Revision: D3523384 fbshipit-source-id: 359ff274fabcab676ed6dee24f0652c4146cde69 --- Libraries/Experimental/SwipeableRow/SwipeableListView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Experimental/SwipeableRow/SwipeableListView.js b/Libraries/Experimental/SwipeableRow/SwipeableListView.js index f18d240b12f..206f4e54d24 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableListView.js +++ b/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,