-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Wrong fire onSwipeableWillOpen #935
Comments
Having the same issue. I would have expected that this event is called on start. How this differ from onSwipeableOpen then? |
The idea in #1101 could be a solution if changing |
#999 should make this possible now. |
Btw, what is the difference between onSwipeableWillOpen and onSwipeableOpen. If there is a good reason, I think new lifecycle method are necessary. If there is no good reasons (= not really a bug but still is?) it should be changed, but would be a breaking change. Otherwise, we could add new lifecycle (onSwipeStart+End) as onSwipeableWillOpen might be legit for programmatic opening as you mentioned in #1102 (comment). |
I'd want to know it myself. We can check it in the code but that's not the point – having will/did and plain lifecycle methods is confusing to the developers using this component. Currently, we have the following description in docs:
I imagine this is confusing to the new developers using RNGH.
For me, there's little sense to create another lifecycle method; we added will/did, left/right prefix and it effectively makes the number of lifecycle methods eightfold. Adding onSwipeStart/End makes situation worse. Ideally, it'd be only one/two callbacks:
Or:
We could add another method similar to #999 providing slide percentage as well(have you almost finished swiping?). But we have to work with what we have so I think adding something that was mentioned in #1101 could be beneficial (you can just make a guard for other positions: |
onSwipeableWillOpen is incorrectly documented.
Currently I am trying to implement the dumbest thing possible for swipeable: being able to have a row with open options. I am open to any clean solution that allow this trivial behaviour to be implemented. |
) ## Description Fixes #935 The event onSwipeableWillOpen only starts right before the onSwipeableOpen event, not when the drag to open / close starts. This PR includes onSwipeableOpenStartDrag (direction: 'left' | 'right') and onSwipeableCloseStartDrag (direction: 'left' | 'right'), allowing execute actions when the animation to open/close starts (when drag starts). ## Test plan Tested in the example app. --------- Co-authored-by: Felipe <felipe.farias@gazin.com.br> Co-authored-by: Michał Bert <63123542+m-bert@users.noreply.github.com>
Method onSwipeableWillOpen fired only after open panel, but not when start movement. How fix this moment?
The text was updated successfully, but these errors were encountered: