-
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
Add interactive dismiss enabled to add full support for iOS 13 style page sheet modals #32285
Add interactive dismiss enabled to add full support for iOS 13 style page sheet modals #32285
Conversation
…page sheet modals
Base commit: 16397e0 |
Base commit: 16397e0 |
Any hope of this being merged? |
I've fixed the merge conflicts |
I believe this has already been merged in via other PRs |
I think this still needed, or am I missing something? Mentioned PR doesn't seem to have this functionality. |
@jacobp100 this was never merged or addressed in other PR's, any chance of revisiting? There is currently no way to present a native modal in iOS that can be dismissed smoothly via swipe down, including community libraries. We really need this. |
Actually it looks like this is superseded by: #38641 |
Summary
Add interactive dismiss enabled to add full support for iOS 13 style page sheet modals
See #31500
In the current behaviour, there's friction when dismissing. This enables removing that friction via a new
interactiveDismissEnabled
prop.When using this prop, you must implement
onDismiss
- and that callback must lead to settingvisible: false
.I felt this was consistent, because
onDismiss
was called when a modal was fully dismissed. When using the interactive dismissal, we only get notified when it's actually dismissed.This feature is opt-in to maintain backwards compatibility.
Changelog
[iOS] [Added] - Added interactiveDismissEnabled prop to Modal component
Test Plan
Added example in RN tester. Video below.
Screen.Recording.2021-09-28.at.19.07.35.mov