hoaphantn7604 / react-native-element-dropdown

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

Fixing sizing and position issues with Math.floor for dropdown #296

Open KalebLenfest opened 2 months ago

KalebLenfest commented 2 months ago

When testing this library, I found that removing the Math.floor would get the correct size of the parent component, whereas with it would end up short in many cases both for width and left specifically

EmanuelDesarrollo commented 4 days ago

I have to stick to a design where the dropdown list and container list need to be synchronized on the same border, I never found the solution with props. When researching in the library I discovered the same thing as @KalebLenfest, the Math.floor property affects the correctness of the elements, in the attached image you can see the difference.

Usually with Math.floor(): media_20241122_110045_8172241661631911541

After the change, remove Math.floor(): media_20241122_110045_113654259456071237

Please accept the change sent by @KalebLenfest , thank you!