Open
Description
Describe the bug
When tapping on the react-native-picker-select dropdown, it throws the following error instead of opening:
Warning: Error: Exception in HostFunction: TypeError: expected dynamic type
string', but had type null'
To Reproduce
Expected behavior
The picker should open normally and allow the user to select an option without throwing an error.
Screenshots
Additional details
- Device: iPhone 16 Pro Max
- OS: iOS 17+
- react-native-picker-select version: ^9.3.1
- react-native version: 0.76.6
- react version: 18.3.1
- expo sdk version: 52.0.28
- React Native new architecture: Enabled
Reproduction and/or code sample
import React, { useState } from 'react';
import { View } from 'react-native';
import RNPickerSelect from 'react-native-picker-select';
const App = () => {
const [value, setValue] = useState(null);
return (
<View style={{ flex: 1, justifyContent: 'center', padding: 20 }}>
<RNPickerSelect
onValueChange={(val) => setValue(val)}
items={[
{ label: 'Option 1', value: '1' },
{ label: 'Option 2', value: '2' },
]}
value={value} // Added explicitly
style={{inputIOSContainer: {pointerEvents: "none"},
}}
/>
</View>
);
};
export default App;
Metadata
Metadata
Assignees
Labels
No labels