Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the backdrop start height to be under navigation bar. #144

Closed
ChristianTucker opened this issue Apr 18, 2018 · 4 comments
Closed
Labels

Comments

@ChristianTucker
Copy link

I'm trying to figure out the best way to get the backdrop to start under the navigation bar, as there are items on our navigation bar that we want the user to continue to be able to interact with while the modal is loaded.

We're already using onLayout to get the height of our header and adjusting our modal's styling based on that value. I've tried adjusting the style prop for the react-native-modal component to use absolute positioning, but that didn't work. I've also tried adjusting the marginTop property.

@yll090
Copy link

yll090 commented Apr 18, 2018

Well, if you look at the code, it's really not possible at the moment -- it uses the device's width/height. I really don't have time for a PR right now, when/if I do I'd make one. :/

@mmazzarolo
Copy link
Member

Hey!
I would strongly suggest against keeping the toolbar active while showing the (react-native) modal.
Imho it would be better using a completely JS solution.

P.S.: If you're interested I'm porting react-native-modal to a fully JS lib. I'm opening an issue for it.

@ChristianTucker
Copy link
Author

ChristianTucker commented Apr 19, 2018

@mmazzarolo We were using the modal implementation in-place of a Drawer navigator. Therefor keeping the toolbar active is definitely ideal for our situation. However I've already made the appropriate modifications for this to work. This was just preference opposed to something like react-native-drawer.

Example

Ignore the placeholder UI elements, this was a gif of before we fixed it, but just to show you why we wanted it.

@krestaino
Copy link

@ChristianTucker What did you do to achieve this? I am working on an app where I want 2 buttons to still be clickable over the backdrop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants