ReanimatedSwipeable: onSwipeableClose is triggered when onSwipeableOpen is not set #3475
Labels
Missing repro
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Description
I’ve observed unexpected behavior in the
ReanimatedSwipeable
component. When theonSwipeableOpen
prop is not provided, theonSwipeableClose
callback is triggered even after the component has opened. This is based on the code (see snippet below and ReanimatedSwipeable.tsx#L362). ThedispatchEndEvents
function dispatchesonSwipeableClose
when the previous conditions fail due to not setonSwipeableOpen
.I'm not sure if this is a bug or the intentional behavior, but this leads to a confusing situation where an
onSwipeableClose
event is fired right after opening, which is not intuitive.Steps to reproduce
Snack or a link to a repository
N.A.
Gesture Handler version
2.25.0
React Native version
0.77
Platforms
iOS, Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: