Skip to content

Commit 2fd81a5

Browse files
el1tfacebook-github-bot
authored andcommitted
Pass hitSlop prop into TextInput Pressability config (facebook#38857)
Summary: Pull Request resolved: facebook#38857 `hitSlop` must be passed into the `usePressability` hook in order for it to take effect. It's a no-op if no hit slop is present Changelog: [Internal][Fixed] - Propagate hit slop prop to TextInput pressability config Reviewed By: NickGerleman Differential Revision: D48124538 fbshipit-source-id: 1d95259cd0dfd02f3646022d1fe7f4d39e66a9fa
1 parent 93d9248 commit 2fd81a5

File tree

1 file changed

+2
-0
lines changed
  • packages/react-native/Libraries/Components/TextInput

1 file changed

+2
-0
lines changed

packages/react-native/Libraries/Components/TextInput/TextInput.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,7 @@ function InternalTextInput(props: Props): React.Node {
13801380

13811381
const config = React.useMemo(
13821382
() => ({
1383+
hitSlop: props.hitSlop,
13831384
onPress: (event: PressEvent) => {
13841385
if (props.editable !== false) {
13851386
if (inputRef.current != null) {
@@ -1394,6 +1395,7 @@ function InternalTextInput(props: Props): React.Node {
13941395
}),
13951396
[
13961397
props.editable,
1398+
props.hitSlop,
13971399
props.onPressIn,
13981400
props.onPressOut,
13991401
props.rejectResponderTermination,

0 commit comments

Comments
 (0)