software-mansion/react-native-gesture-handler

<Swipeable> conflict with react navigation fullScreenGestureEnabled

fukemy opened this issue · 5 comments

Description

If the flatlist cell contain Swipeable => fullScreenGestureEnabled not working

Steps to reproduce

  1. make sure add fullScreenGestureEnabled to Stack:
         fullScreenGestureEnabled: true
     }}> ... </>
    
  2. Using FlatList with <Swipeable> => fullScreenGestureEnabled not working

Snack or a link to a repository

https://snack.expo.io/

Gesture Handler version

2.9.0

React Native version

0.72.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

Hi @fukemy! Please provide a reproduction that we can look at.

ok, I will provide example soon

Hi @m-bert , I provided snack here, please take a look and give me some advices if I am wrong:
https://snack.expo.dev/@fukemy/gesture-handler-problem

Hi @fukemy! I've looked at your snack. Since you want to use fullScreenGestureEnabled I assume that you don't need left swipe. In that case you can use dragOffsetFromLeftEdge prop, like this:

 <Swipeable
            friction={2}
            rightThreshold={40}
            renderRightActions={renderRightAction}
            dragOffsetFromLeftEdge={1000}  // Use big value to disable left-swipe
          >

Tell me if that trick helps!

You can also use values like Number.MAX_VALUE which seems to be safer choice, it is up to You to decide.

thanks you