ReanimatedSwipeable is swipeable even if renderRightActions prop is undefined, unlike legacy Swipeable #3152
Labels
Close when stale
The issue will be closed automatically if it remains inactive
Missing repro
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Description
Docs say ReanimatedSwipeable is a drop-in replacement for Swipeable, which indicates that it should behave the same way as the legacy one. It is not the case in terms of behavior towards renderRightActions property.
Steps to reproduce
In example app in swipeableReanimation/index.tsx, pass renderRightActions={undefined} for both ReanimatedSwipeable and Swipeable components.
In case of ReanimatedSwipeable, the row is still swipeable even when there is no content provided and the the row content goes beyond the left edge of the screen and becomes invisible. The legacy one is no longer swipeable when the are no actions provided, which is the correct behavior in my opinion. If it's not a bug and this behavior is desired, it should have been noted in the docs.
Possible workaround is rendering the ReanimatedSwipeable component conditionally.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-13.at.18.25.44.mp4
Snack or a link to a repository
https://snack.expo.io/
Gesture Handler version
2.20.0
React Native version
0.74.3
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
Samsung S21
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: