hoaphantn7604 / react-native-element-dropdown

A react-native dropdown component easy to customize for both iOS and Android.
MIT License
861 stars 154 forks source link

Dropdown Component is not visible in Android #260

Open prog-nayeem opened 2 months ago

prog-nayeem commented 2 months ago

The dropdown component is not opening in the Android emulator, while it is functioning properly in the iOS simulator. Is anyone else experiencing the same issue?

<Dropdown selectedTextProps={{numberOfLines: 3}} style={{height: 72, paddingHorizontal: 18, flex: 1, width: '100%'}} selectedTextStyle={{fontSize: 16, fontWeight: '500'}} placeholderStyle={{ color: '#6B7280', fontWeight: '500', fontSize: 16, }} containerStyle={{ paddingHorizontal: 6, backgroundColor: '#FFFFFF', shadowColor: '#000', shadowOffset: { width: 0, height: 4, }, shadowOpacity: 0.09, shadowRadius: 16, borderRadius: 14, elevation: 10, }} itemTextStyle={{ fontSize: 16, fontWeight: '500', }} value={selectedValue} data={data} labelField="label" valueField="value" maxHeight={215} placeholder={placeholderText} onChange={(item: Item) => setSelectedValue(item)} renderRightIcon={() => ( <ImageBackground source={AngleDownIcon} style={{width: 22, height: 22}} imageStyle={{tintColor: '#AFB42B'}} /> )} />

asergb-churon commented 2 months ago

how did you import the dropdown component?

i fixed my issue by adding braces

import { Dropdown } from 'react-native-element-dropdown';