mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 20:35:43 +08:00
Don't block scroll when using non-touchable visible row for SwipeableRow
Summary:
**motivation**
Currently when using a non-touchable visible row for a SwipeableRow, the scroll on list view is blocked.
**Test Plan**
```
<SwipeableListView
dataSource={dataSource}
renderRow={() => <View style={styles.row}/>}
renderQuickActions={() => <View style={styles.hiddenrow}/>}
/>
```
* Tested that when using non-touchable for renderRow allows scrolling on list view.
* Tested that when using touchable for renderRow allows scrolling on list view.
cc fred2028
Closes https://github.com/facebook/react-native/pull/8537
Differential Revision: D3542407
Pulled By: fred2028
fbshipit-source-id: b7ad7ff7c7dd1b717544746a85bb265414aa18f4
This commit is contained in:
committed by
Facebook Github Bot 3
parent
a2c6a7bc64
commit
13a19a8897
@@ -128,10 +128,6 @@ const SwipeableRow = React.createClass({
|
||||
|
||||
componentWillMount(): void {
|
||||
this._panResponder = PanResponder.create({
|
||||
onStartShouldSetPanResponder: (event, gestureState) => true,
|
||||
// Don't capture child's start events
|
||||
onStartShouldSetPanResponderCapture: (event, gestureState) => false,
|
||||
onMoveShouldSetPanResponder: (event, gestureState) => false,
|
||||
onMoveShouldSetPanResponderCapture: this._handleMoveShouldSetPanResponderCapture,
|
||||
onPanResponderGrant: this._handlePanResponderGrant,
|
||||
onPanResponderMove: this._handlePanResponderMove,
|
||||
|
||||
Reference in New Issue
Block a user