Open enigmablue opened 4 years ago
Hi,
As soon as we put in a PanResponder, the swipe gesture fails in the ViewPager. Any one knows why?
const panResponder = PanResponder.create({ onStartShouldSetPanResponderCapture: (evt, gestureState) => true, onPanResponderGrant: ({ nativeEvent: { touches } }, { x0 }) =>{ if (this.state.horizontalShares.length > 0 && (x0 > (Dimensions.get('window').width / 1.3))){ this.setState({moveHorizontal: "next"}) } if (this.state.horizontalShares.length > 0 && this.state.horizontalIndex !== 0 && (x0 < (Dimensions.get('window').width / 1.3))) { this.setState({moveHorizontal: "back"}) } } });
Hi,
As soon as we put in a PanResponder, the swipe gesture fails in the ViewPager. Any one knows why?