mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot 4
parent
3a24c63f73
commit
ba3c7ef08c
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user