TextInput 을 View로 감싼 후 pointerEvents 설정을 하게되면 Pressable구성 요소를 사용하여 이벤트를 설정 할 수 있습니다.
예시)
<Pressable onPress={() => alert('Hi!')}>
<View pointerEvents="none">
<TextInput />
</View>
</Pressable>
출처:
https://stackoverflow.com/questions/54707607/how-to-setup-onpress-on-textinput-in-react-native
태클은 언제나 환영입니다. 잘못된 부분이 있다면 댓글 남겨주세요 :)
'React-Native' 카테고리의 다른 글
[ReactNative] navigation.goBack() 2번 / 한번의 프레스 이벤트로 두 화면 뒤로 이동 하는법 (0) | 2023.04.16 |
---|---|
[ReactNative] FlatList의 스크롤의 시작과 끝을 알고싶을때 (0) | 2023.04.13 |
react-native-image-crop-picker, ImagePicker 안드로이드(android)에서 Cannot find image data 해결하는법 (2) | 2023.02.25 |
[ReactNative] 배포시 console.log 없애기 (0) | 2023.01.14 |
[ReactNative] crypto-js를 이용한 AES ECB 모드 암호화 및 복호화 하기 (0) | 2022.12.11 |