react native click 관련 이벤트가 안될때(onPress등등)


react native click 관련 이벤트가 안될때(onPress등등)

뷰를 완벽하게 짜고 테스트할때 가끔 onPress이벤트가 작동안할때가 있음 해결법 onPress버튼을 View로 감싸고 스타일에 position:'absolute'나 zindex값을 추가하면 클릭 위치 잘 작동함 //예시 <View style={{ zIndex: 2,}}> <Pressable style={{ height: 35, width: 55, }} onPress={() =>{"버튼클릭이벤트"}} </Pressable> </View> https://github.com/callstack/react-native-paper/issues/1883 onPress not detected on position: absolute element inside Menu's anchor property · Issue #1883 · callstack/react-native-paper OnPress not working on position absolute element inside Menu anchor...



원문링크 : react native click 관련 이벤트가 안될때(onPress등등)