react-native-modal-dropdown
react-native-modal-dropdown copied to clipboard
app crashed when press on dropDownmodal
I hide the ModalDropdown when I show it and try to press it, all app crashed and closed I hade many dropDown in the screen , show or hide as user request
"expo": "~42.0.1",
"expo-status-bar": "~1.0.4",
"react": "16.13.1",
"react-native-modal-dropdown": "^1.0.2",
<ModalDropdown
options={['Male', 'Female']}
style={{
width: '100%',
borderBottomWidth: 1,
borderColor: '#CCCCCC',
paddingVertical: 10
}}
showsVerticalScrollIndicator={true}
dropdownStyle={{
width: '80%',
backgroundColor: '#CCCCCC',
alignSelf: 'flex-end',
shadowRadius: 16,
shadowColor: 'rgba(0, 0, 0, 0)',
shadowOffset: { width: 1, height: 6 },
shadowOpacity: 0.25,
elevation: 2,
marginTop: -20,
height: 'auto'
}}
dropdownTextStyle={{
fontSize: 16,
textAlign: 'left',
color: 'rgba(0, 0, 0, 1)',
}}
textStyle={{ fontSize: 16, color: '#424242', }}
defaultValue="Select your Gender"
onSelect={(index)=>console.log(index)}
/>
@FatmaMahmoud698 Had you been able to resolve this issue? as I'm also getting the same issue.
the issue solved when I changed this line height: 'auto'
to be height: 300
@Mohammad-Khalid
@FatmaMahmoud698 Thank you, it really helped
Please use 1.0.2 version , it's working fine for me.