ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.41k stars 119 forks source link

fix: Bottom Space Problem on all devices #328

Closed jonxssc closed 5 months ago

jonxssc commented 5 months ago

Fixes the Issue of a sometimes appearing Bottom Space at the ActionSheet. In this Image you see a big green space on the bottom of the Actionsheet, this appears sometimes on Android and Ios like this Issue told us: https://github.com/ammarahm-ed/react-native-actions-sheet/issues/222

By removing the - safeMarginFromTop it calculates the Actionsheet height correctly and the problem should be solved.

I tested it using version 0.8.29 on Android and Ios, on both Devices it was fixed.

"react-native-actions-sheet": "^0.8.29",

237386105-560f8c94-f2fc-46b0-8682-7fe616cdd4b7

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rnas ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2024 5:26pm
ammarahm-ed commented 5 months ago

Hey, thanks for the PR, are you able to consistently reproduce this issue?

jonxssc commented 5 months ago

Yes, on every version greater then 0.8.3 the error ocures, on both Platforms (Android and Ios). It doesnt happen always when opening a Actionsheet, but i noticed when opening for example a textinput or changing a big part of the content, which effects the height of the Actionsheet, then the bottom space appears.

ammarahm-ed commented 5 months ago

I made a more proper fix in #330 PR but I will merge this too for now. Thanks for contributing!