-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: align patch to react-navigation main code (which is not publis…
…hed to npm yet)
- Loading branch information
1 parent
10abe0b
commit 7073fdc
Showing
2 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
diff --git a/node_modules/@react-navigation/native-stack/src/types.tsx b/node_modules/@react-navigation/native-stack/src/types.tsx | ||
index 206fb0b..7104b93 100644 | ||
index 206fb0b..7a34a8e 100644 | ||
--- a/node_modules/@react-navigation/native-stack/src/types.tsx | ||
+++ b/node_modules/@react-navigation/native-stack/src/types.tsx | ||
@@ -490,6 +490,12 @@ export type NativeStackNavigationOptions = { | ||
@@ -490,6 +490,14 @@ export type NativeStackNavigationOptions = { | ||
* Only supported on iOS and Android. | ||
*/ | ||
freezeOnBlur?: boolean; | ||
+ // partial changes from https://github.com/react-navigation/react-navigation/commit/90cfbf23bcc5259f3262691a9eec6c5b906e5262 | ||
+ // patch can be removed when new version of `native-stack` will be released | ||
+ /** | ||
+ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`. | ||
+ * | ||
+ * Only supported on iOS | ||
+ */ | ||
+ hideKeyboardOnSwipe?: boolean; | ||
+ keyboardHandlingEnabled?: boolean; | ||
}; | ||
|
||
export type NativeStackNavigatorProps = DefaultNavigatorOptions< | ||
diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx | ||
index a005c43..dc22c63 100644 | ||
index a005c43..03d8b50 100644 | ||
--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx | ||
+++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx | ||
@@ -161,6 +161,7 @@ const SceneView = ({ | ||
statusBarTranslucent, | ||
statusBarColor, | ||
freezeOnBlur, | ||
+ hideKeyboardOnSwipe, | ||
+ keyboardHandlingEnabled, | ||
} = options; | ||
|
||
let { | ||
@@ -289,6 +290,7 @@ const SceneView = ({ | ||
onNativeDismissCancelled={onNativeDismissCancelled} | ||
// this prop is available since rn-screens 3.16 | ||
freezeOnBlur={freezeOnBlur} | ||
+ hideKeyboardOnSwipe={hideKeyboardOnSwipe} | ||
+ hideKeyboardOnSwipe={keyboardHandlingEnabled} | ||
> | ||
<NavigationContext.Provider value={navigation}> | ||
<NavigationRouteContext.Provider value={route}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters