Skip to content

Commit d22f94c

Browse files
authored
Fix/text field focused when disable (#2782)
* pointerEvents is now none if the input field is disabled. * Changed pointerEvents if not disabled so it can be passed from the parent component
1 parent a6435c8 commit d22f94c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/incubator/TextField/Input.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const Input = ({
3636
useGestureHandlerInput,
3737
readonly,
3838
recorderTag,
39+
pointerEvents,
3940
...props
4041
}: InputProps & ForwardRefInjectedProps) => {
4142
const inputRef = useImperativeInputHandle(forwardedRef, {onChangeText: props.onChangeText});
@@ -70,6 +71,7 @@ const Input = ({
7071
ref={inputRef}
7172
underlineColorAndroid="transparent"
7273
accessibilityState={{disabled}}
74+
pointerEvents={disabled ? 'none' : pointerEvents}
7375
/>
7476
);
7577
};

0 commit comments

Comments
 (0)