Picker doesn't open on iOS, expo 54
Describe the bug
After update from expo sdk 52 to expo sdk 54, RNPickerSelect does not open on ios
To Reproduce
I added simple Picker from example to main file, and after clicking on piccker nothing happens. I have add the console.log to oOpen and it is not called.
Expected behavior
The picket should open after clicking on Picker
Screenshots
n/a
Additional details
- Device: iPhone 16, physical phone and simulator
- OS: ioS 18.0
- react-native-picker-select version: 9.3.1
- react-native version: 0.8
- expo sdk version: 54
Reproduction and/or code sample
as an example
<View style={{ marginTop: 200 }}>
<RNPickerSelect
onValueChange={(value) => console.log(value)}
items={[
{ label: "Football", value: "football" },
{ label: "Baseball", value: "baseball" },
{ label: "Hockey", value: "hockey" },
]}
/>
</View>
I recently ran into this, too. Adding a zIndex to the inputIOSContainer style fixed it for me:
<View style={{ marginTop: 200 }}>
<RNPickerSelect
onValueChange={(value) => console.log(value)}
items={[
{ label: "Football", value: "football" },
{ label: "Baseball", value: "baseball" },
{ label: "Hockey", value: "hockey" },
]}
style={{
inputIOSContainer: {
zIndex:100,
},
}}
/>
</View>
thanks! it works alse for me:)
I recently ran into this, too. Adding a zIndex to the inputIOSContainer style fixed it for me:
Fixed it for me too, thanks @drmishra !
snippet
import SelectPicker from 'react-native-picker-select';
// [...]
<SelectPicker
style={{
[... other styles ...]
inputIOSContainer: {
zIndex: 100,
},
}}
// [...]
Tested on iPhone 12, iOS 16.1.1
expo: 53
react-native-picker-select version v2.11.4 for anyone looking at this in the future.
react: 19
react-native: 0.79.6
yarn.lock
"@react-native-picker/picker@^2.11.4":
version "2.11.4"
resolved "https://registry.yarnpkg.com/@react-native-picker/picker/-/picker-2.11.4.tgz#7fb09506ee00a82989125cc03e8495204c8afc01"
integrity sha512-Kf8h1AMnBo54b1fdiVylP2P/iFcZqzpMYcglC28EEFB1DEnOjsNr6Ucqc+3R9e91vHxEDnhZFbYDmAe79P2gjA==