Stacked TouchableOpacity inside another TouchableOpacity is not clickable

前端 未结 3 696
深忆病人
深忆病人 2021-02-05 10:14

Even though this document (https://facebook.github.io/react-native/docs/gesture-responder-system.html) states, that touch events are passed down to the children and are only con

3条回答
  •  爱一瞬间的悲伤
    2021-02-05 10:58

    You could just use TouchableWithoutFeedback to wrap inner TouchableOpacity.

    Something like:

     console.log('This is printed always')}>
        
            I can click here
            
                 console.log('This is printed never')}>
                    I can click here but the outer onPress is called instead of the inner one
                
            
        
    
    

提交回复
热议问题