FluidTransitions icon indicating copy to clipboard operation
FluidTransitions copied to clipboard

nested FluidNavigator in tabs gesture control goes back on parent stack navigator

Open jrwpatterson opened this issue 5 years ago • 4 comments

I have a navigator that follows the following logic.

stackNavigator -home -tabNavigator --FluidNavigator --- issue ---topMenu ---menu ---product --basket -checkout page

if I'm using gesture control the fluid navigator goes back to the home screen no matter where I am in the fluid stack... if I use stack navigator gestures work as expected... and they flow from product --> menu --> topMenu --> home

if I put FluidNavigator at root with tabNavigator the gestureEnabled doesn't allow swipe back from the tab navigator to home...

How do I nest without this problem

jrwpatterson avatar Mar 11 '19 05:03 jrwpatterson

Hello, we are experiencing the same issue, we've tried to override the behaviour via the react-navigation listeners but nothing seems to fix this.

Edit: the back button on android is working as intended, but gesture also fail on android

peacepostman avatar Mar 14 '19 16:03 peacepostman

I have a solution I can today create a pr to the documentation to show how to use inside a standard stack and tab navigation and allow the gestures to work... tldr you have to dynamically adjust the gesture handler based on navigation state...

jrwpatterson avatar May 15 '19 21:05 jrwpatterson

FluidNavigator.js uses the PanResponder from 'react-native' to handle gesture interactions whereas the StackViewLayout.tsx uses PanGestureHandler from 'react-native-gesture-handler' (react-navigation v3 is based on react-native-gesture-handler).

Ideally FluidNavigator.js would migrate to 'react-native-gesture-handler' so that this type of stuff would just work without any workarounds.

siderakis avatar Jun 06 '19 11:06 siderakis

Did anyone find a workaround for this?

rafaelmotta avatar Jul 16 '19 06:07 rafaelmotta