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

Right action is not visible if calling openRight on ReanimatedSwipeable #3194

Open
yongwei-finesse opened this issue Oct 31, 2024 · 4 comments
Labels
Missing repro Platform: iOS This issue is specific to iOS

Comments

@yongwei-finesse
Copy link

Description

We are using ReanimatedSwipeable to show a right action when a cell is swiped. We may also show that action when a button is tapped by calling openRight on that swipable. When the right action is shown, if we drag that action back instead of swiping it back, calling openRight will not show the action again. Please check the attached video.

We did some investigation and found that the variable rightActionTranslate defined in ReanimatedSwipeable.ts is -10000 when the bug happens, and so the right action is actually shown out of the screen.

ScreenRecording_10-31-2024.14-45-15_1.MP4

Steps to reproduce

We have a cell contained in ReanimatedSwipeable, and a Delete button in that cell. openRight will be called when the delete button is tapped.

  1. Swipe the cell to show the right action
  2. Drag the cell to hide the right action
  3. Tap the Delete button so that openRight is called to show the right action

Snack or a link to a repository

Just use the latest code

Gesture Handler version

2.20.2

React Native version

0.74.3

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Missing repro Platform: iOS This issue is specific to iOS labels Oct 31, 2024
@latekvo
Copy link
Contributor

latekvo commented Nov 4, 2024

Hi @yongwei-finesse, thank you for reporting this.

Could you please let me know if this issue still occurs in this PR?
Unfortunately I wasn't able to replicate it on my end, neither on the main branch, and the aforementioned PR.

@yongwei-finesse
Copy link
Author

Yeah. The issue doesn't occur in the PR you mentioned. But the PR has a regression though. If we call openRight before swiping the cell, the right action won't be shown. openRight only works after the cell has been swiped at least once.

@latekvo
Copy link
Contributor

latekvo commented Nov 7, 2024

Thank you a lot for catching that, I believe it should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

2 participants