Open gezichenshan opened 7 years ago
It is a fabulous work!
But the 1st thing embarrassed me is that the FlatList can't be still when I do a swipe.
And the 2nd is that the swipe btns cannot be removed when I clicked another row or blank space.
I read the source code about the PanResponder:
... componentWillMount: function() { this._panResponder = PanResponder.create({ onStartShouldSetPanResponder: (event, gestureState) => true, onStartShouldSetPanResponderCapture: (event, gestureState) => this.state.openedLeft || this.state.openedRight, onMoveShouldSetPanResponder: (event, gestureState) => Math.abs(gestureState.dx) > this.props.sensitivity && Math.abs(gestureState.dy) <= this.props.sensitivity, onPanResponderGrant: this._handlePanResponderGrant, onPanResponderMove: this._handlePanResponderMove, onPanResponderRelease: this._handlePanResponderEnd, onPanResponderTerminate: this._handlePanResponderEnd, onShouldBlockNativeResponder: (event, gestureState) => false, onPanResponderTerminationRequest: () => false, }); }, ...
It seem that the onPanResponderTerminationRequest: () => false doesn't reject the gesture of FlatList's scroll?
It seems that I am in a same trouble as #179 .
It is a fabulous work!
But the 1st thing embarrassed me is that the FlatList can't be still when I do a swipe.
And the 2nd is that the swipe btns cannot be removed when I clicked another row or blank space.
I read the source code about the PanResponder:
It seem that the onPanResponderTerminationRequest: () => false doesn't reject the gesture of FlatList's scroll?