How to stop touch event propagation in React-Native

前端 未结 5 1187
南笙
南笙 2021-02-05 09:12

I have a scrollview with a grid of images when I long press on an image I’d like to stop propagating the mouse events to the scrollview and just monitor the movements. With the

5条回答
  •  庸人自扰
    2021-02-05 10:03

    This might be new since the previous answers, but I find you can just gobble the event using another "touchable":

    
        
            Content
        
    
    

    In this example, touching the text does not trigger onPressOuter

提交回复
热议问题