-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Navigator] Pop route from stack when dismissed via gesture. #1018
Conversation
@mjw56 - just to clarify: When you pull down to dismiss a view that was introduced with FloatFromBottom it currently does not pop the route from the stack but does dismiss the view. This pull request also removes it from the route stack. Is this correct? |
@brentvatne hey, yeah that's correct. It will remove it from the stack and call the dismissed component's componentWillUnmount lifecycle hook. @ericvicenti can you help verify this is the right fix? |
@@ -736,6 +736,7 @@ var Navigator = React.createClass({ | |||
if (transitionVelocity < 0 || this._doesGestureOverswipe(releaseGestureAction)) { | |||
this._transitionToFromIndexWithVelocity(transitionVelocity); | |||
} else { | |||
this._handlePop(); |
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.
I probably wouldn't do it this way. This will theoretically start the transition twice, and _handlePop
also sometimes calls pop on child navigators instead of itself
I have refactored this code already and I think I have this issue fixed. The new code will land soon and we can double check
Ok, thanks for your reply @ericvicenti! I will close this and let it be handled in your refactored code. Cheers |
I've just run into the same problem. Any ETA on when the refactored code will land? Also, #1025 can probably be closed along with this? |
@ericvicenti running into this issue as well...any updates on the refactor? |
Update touchablenativefeedback.md
This PR fixes an issue described in #1014 where a route is not being removed from the stack when dismissed via a pop gesture.