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

Determine auto dropdown position by half of the screen height #264

Open rockychan opened 2 months ago

rockychan commented 2 months ago

Issue: The bottom space is small to show a reasonable size of dropdown when dropdownPosition is auto and it shows at bottom after calculation. Because of bottom space of value 100 and 150 (search = true) are determined as enough to show the dropdown in bottom.

Solution: Determine bottom space by half of the device height

qaezrun commented 2 months ago

Sorry not really related to your matter @rockychan, i just want to know if you have any idea about my problem. dropdown position auto works fine when you focus on input search and your dropdown is near bottom which might get covered by the keyboard it automatically goes up right above the keyboard. the problem is how about when dropdown is just right above the keyboard and does not trigger the setting of position to top? dropdown gets covered by the keyboard.

i have multiple dropdown inside scrollview, so sometimes dropdown is near bottom or just right enough above the keyboard that wont trigger the changing of position.

i also tried setting manually dropdown position to top whenever keyboard is open but dropdown loses the automatic functionality where in if user focus on search input it goes right above the keyboard.