From 1c8658a6b05a60e79e6af0357b71fc5ae46edebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Wed, 18 Jun 2025 13:50:31 +0200 Subject: [PATCH 1/2] Update moda docs --- docs/modal.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/modal.md b/docs/modal.md index f401e499031..3e564b764ad 100644 --- a/docs/modal.md +++ b/docs/modal.md @@ -174,12 +174,24 @@ The `onOrientationChange` callback is called when the orientation changes while | -------- | | function | + +--- + +### `allowSwipeDismissal`
iOS
+ +Controls whether the modal can be dismissed by swiping down on iOS. +This requires you to implement the `onRequestClose` prop to handle the dismissal. + +| Type | Default | +| ---- | ------- | +| bool | `false` | + --- ### `onRequestClose` The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open. -On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet` +On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`. When `allowSwipeDismissal` is enabled this callback will be called after dismissing the modal. | Type | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | From 09ae472f2247e29a92a3d2748bb157b3f4487dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Wed, 18 Jun 2025 13:53:59 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/modal.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/modal.md b/docs/modal.md index 3e564b764ad..c47a6863ef5 100644 --- a/docs/modal.md +++ b/docs/modal.md @@ -174,7 +174,6 @@ The `onOrientationChange` callback is called when the orientation changes while | -------- | | function | - --- ### `allowSwipeDismissal`
iOS
@@ -191,7 +190,7 @@ This requires you to implement the `onRequestClose` prop to handle the dismissal ### `onRequestClose` The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open. -On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`. When `allowSwipeDismissal` is enabled this callback will be called after dismissing the modal. +On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`. When `allowSwipeDismissal` is enabled this callback will be called after dismissing the modal. | Type | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |