Change gestureHandlerProps based on value, dynamically or via State
Example
For example, if one wanted to do something like this:
<TabView
navigationState={{ index, routes }}
swipeEnabled={index !== 3}
gestureHandlerProps={{ failOffsetX: index === 2 ? 1 : -1 }}
renderScene={renderScene}
onIndexChange={setIndex}
initialLayout={initialLayout}
/>
Reasoning
It would allow one to have more control over the panhandler and allow things like:
- Limiting the direction of the swipe based on index
- Changing the props for animation based on state
Environment
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-tab-view": "^2.14.4",
Current behaviour
With the given example, I can swipe left on all tabs but not right.
Expected behaviour
In the example, I should be able to swipe left on all tabs, and not right (working). But at index === 2 I should be able to swipe left AND right (not working).
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native-tab-view(found:2.14.0, latest:2.14.4)
Can you verify that the issue still exists after upgrading to the latest versions of these packages?
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native-tab-view(found:2.14.0, latest:2.14.4)Can you verify that the issue still exists after upgrading to the latest versions of these packages?
Yes I can verify that the current version still has this issue even after updating to 2.14.4.
Any update on this issue? Gesturehandlerprops doesn't seem to work for me still
Can you describe it a bit more? "For example, if one wanted to do something like this:", that code is currently valid, is there a bug? Or is there something else you need to acheive?