-
-
Notifications
You must be signed in to change notification settings - Fork 333
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: apply panGestureHandlerProps to gesture #466
Conversation
🦋 Changeset detectedLatest commit: 77caa06 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
.onUpdate(onGestureUpdate) | ||
.onEnd(onGestureFinish); | ||
|
||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
destructure panGestureHandlerProps, we need to handle each separately, we cannot iterate over them and call the functions on Gesture.Pan() dynamically because the function and prop names do not all match
@@ -1,11 +1,11 @@ | |||
import type { PropsWithChildren } from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatted with the repo's prettier config
src/ScrollViewGesture.tsx
Outdated
validStart, | ||
touching, | ||
]); | ||
if (typeof activeOffsetXStart === 'number' || typeof activeOffsetXEnd === 'number') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check type instead of truthiness in case the provided value is falsey and the default value is not
…s' into forward-pan-gesture-handler-props
@dohooo . If this change looks good to you, can you please merge and roll this out? Thanks. |
Feel free to ask for help in the testing. I can include the new release in my next build and see what happens |
@dohooo +1 on this issue, it's very much needed for the basic functionality — and it looks like it's good to go! |
I tried it, but it didn't work. activeOffsetX: [-10, 10] still doesn't work. |
try |
panGestureHandlerProps={{ |
I just tried this, and it's NOT working on iOS, inside a modal:
|
I can confirm this PR fixes the issue for v4, at least outside of Modals. 👍 I recommend merging this and dealing with the modal issue separately. |
in FlatList is ok |
replaces PanGestureConfig with PanGestureHandlerProps
Solved in #493, THX for your effort. |
fixes #465