react-native-select-dropdown
react-native-select-dropdown copied to clipboard
DropDown display out of screen
Hello developer friends, I noticed a small problem with the library when the button is on the right, the dropdown is displayed partly outside the screen. I made a fix for this if it is possible to have the authorization to create a pr that would be great. thank you in advance

modification:
ligne 7: const {height, width} = Dimensions.get('window');
ligne 101 & 104:
if(px+dropdownWIDTH>width) { setDropdownPX(px-dropdownWIDTH+w); } else { setDropdownPX(px); }
I will also add that from where i stand line 106 setDropdownWIDTH(dropdownStyle?.width || w);
should be before line 99 if (height - 18 < py + h + dropdownHEIGHT) {
And also line 7 const {height, width} = Dimensions.get('window');
should be before line 96 to be more responsive in web
Fixed 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