diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js index f994e0e929f..42d94a758aa 100644 --- a/packages/react-native/Libraries/Components/Pressable/Pressable.js +++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js @@ -116,6 +116,12 @@ type PressableBaseProps = $ReadOnly<{ */ onPressOut?: ?(event: GestureResponderEvent) => mixed, + /** + * Whether to prevent any other native components from becoming responder + * while this pressable is responder. + */ + blockNativeResponder?: ?boolean, + /** * Either view styles or a function that receives a boolean reflecting whether * the component is currently pressed and returns view styles. @@ -183,6 +189,7 @@ function Pressable({ 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, + blockNativeResponder, cancelable, children, delayHoverIn, @@ -294,10 +301,12 @@ function Pressable({ onPressOut(event); } }, + blockNativeResponder, }), [ android_disableSound, android_rippleConfig, + blockNativeResponder, cancelable, delayHoverIn, delayHoverOut, diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index e2da412d8fa..d21b62c9d14 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<56f048751e6094736be604305b9c6f02>> + * @generated SignedSource<<1f77cd57f1bd57ae59c61a1cc6a58d81>> * * This file was generated by scripts/js-api/build-types/index.js. */ @@ -3759,6 +3759,7 @@ declare type PressableAndroidRippleConfig = { declare type PressableBaseProps = { readonly android_disableSound?: boolean readonly android_ripple?: PressableAndroidRippleConfig + readonly blockNativeResponder?: boolean readonly cancelable?: boolean readonly children?: | ((state: PressableStateCallbackType) => React.ReactNode) @@ -6078,7 +6079,7 @@ export { PointerEvent, // 3c454015 Pressable, // 3c6e4eb9 PressableAndroidRippleConfig, // 42bc9727 - PressableProps, // 4d37b376 + PressableProps, // 00d5ea16 PressableStateCallbackType, // 9af36561 ProcessedColorValue, // 33f74304 ProgressBarAndroid, // 03e66cf5