Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow to override gesture handler props in Swipable #856

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

jayu
Copy link
Contributor

@jayu jayu commented Nov 29, 2019

Hi, I was playing a bit with the Swipeable component. I tried to put it inside react-native-tab-view.
I had a common case, where there is a list of swipable elements on one of the tabs. I turned out I cannot swipe tab view because of the underlying <PanGestureHandler/>.

In my case overriding minDeltaX or activeOffsetX on <PanGestureHandler/> fixes the issue due to a specific placement of swipeable elements on the last tab on the right. I had to patch a package to be able to override minDeltaX since props have been spread in first line of the file.

I decided to open a PR with that fix.
It replaces legacy minDeltaX with activeOffsetX, spread props below activeOffsetX and also improve TypeScript types for this component, so now it inherits props from <PanGestureHandler/>.

@osdnk osdnk merged commit 36c1507 into software-mansion:master Dec 3, 2019
janicduplessis pushed a commit to janicduplessis/react-native-gesture-handler that referenced this pull request Feb 16, 2020
…nsion#856)

* fix: allow to override gesture handler props

* refactor: improve typescript types for Swipable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants