react-native-select-dropdown icon indicating copy to clipboard operation
react-native-select-dropdown copied to clipboard

DropDown display out of screen

Open TristanMaurier98 opened this issue 2 years ago • 3 comments

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

image

TristanMaurier98 avatar Apr 22 '22 15:04 TristanMaurier98

modification: ligne 7: const {height, width} = Dimensions.get('window'); ligne 101 & 104:
if(px+dropdownWIDTH>width) { setDropdownPX(px-dropdownWIDTH+w); } else { setDropdownPX(px); }

TristanMaurier98 avatar Apr 22 '22 16:04 TristanMaurier98

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) {

TristanMaurier98 avatar Apr 25 '22 09:04 TristanMaurier98

And also line 7 const {height, width} = Dimensions.get('window'); should be before line 96 to be more responsive in web

TristanMaurier98 avatar Apr 25 '22 09:04 TristanMaurier98

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

AdelRedaa97 avatar Mar 25 '24 23:03 AdelRedaa97