Closed ManiTWIndia closed 6 months ago
Hi @AdelRedaa97 Can you please review and merge the above
Added in v4.0 take a look at the changes made in v4.0 https://github.com/AdelRedaa97/react-native-select-dropdown?tab=readme-ov-file#-major-changes
Feel free to open the issue again if it still exists
The height of the dropdown row is fixed at 50. So longer options are getting truncated in the dropdown.
In our usecase, the row height should be 25 but for longer options, the height should be flexible. So we pass customized rowStlye prop as { height: null, minheight: 25 }. It works as expected.
But the top position is miscalculated when the dropdown position is on top as safeDropdownViewUnderKeyboard is calculated only using height value which is hardcoded as 50. The dropdown opens at a random position from the select button
To fix the above, modified the safeDropdownViewUnderKeyboard calculation to also check for minHeight when height is not passed. The issue is fixed as in below screenshot. Therefore proposing to use min height also to calculate for top position instead of just height.