Javascript/React-Native

[RN] React-Native-Select IOS Bug

eulBlue 2025. 2. 17. 10:48

📱테스트 환경

"react": "18.3.1",
"react-dom": "^18.3.1",
"react-native": "0.76.1",
"@react-native-picker/picker": "^2.7.7",
"react-native-picker-select": "^9.2.0",

 

Android 나 Web 에서는 잘 되는게 Ios 에서만 이상하게

눌러도 반응이 없었다.

ChatGPT 나 스택오버플로우 깃 이슈 뭐 안본데가 없고 ..

안해본게 없었는데 ..

나와같은 이슈가 없어서

버전도 다운그레이드 해보고 .. 삭제했다 다시깔아보고 ..

다 의미없는 짓이였다 ..

해결방법은 의외로 간단했는데

<RNPickerSelect
      useNativeAndroidPickerStyle={false}
      value={value}
      onValueChange={v => setValue && setValue(v)}
      items={items}
      placeholder={{label: placeholder || '선택', value: null}}
      pickerProps={{
        ...
      }}
      style={{
        inputIOSContainer: {
          pointerEvents: 'none',
        },
        ...
      }}
    />

 InputIOSContainer 에 poinerEvent 를 'none' 처리만 해주면 된다 .. ㅎ

나는 뭐 .. 거의 일주일 삽질했는데 .. 다른 분들은 삽질하지 말구

바로 해결해서 빨리 개발할 수 있도록 하자 ㅎ

 

자세한 내용은 https://github.com/software-mansion/react-native-screens/issues/2339

 

Android - "cannot remove child at index X" error on new architecture · Issue #2339 · software-mansion/react-native-screens

Description When navigating back from a stack screen which contains a FlatList, the app throws a soft error: Cannot remove child at index 9 from parent ViewGroup [106], only 10 children in parent. ...

github.com