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

Dynamic change param "adjustToContentHeight" is not working #53

Closed
SmirnovM91 opened this issue Aug 14, 2019 · 7 comments
Closed

Dynamic change param "adjustToContentHeight" is not working #53

SmirnovM91 opened this issue Aug 14, 2019 · 7 comments
Labels
🚀 New feature New feature or request

Comments

@SmirnovM91
Copy link

If I set adjustToContentHeight = true once,
then If I try to set adjustToContentHeight = false
It still adjustToContentHeight = true

is it ok? or bug?

@jeremybarbet
Copy link
Owner

Hi!

This is not an issue. The adjustToContentHeight is initialized when the component is mounted for the first time. Which mean even when you change the props, the calculation is not run again.

We would need to introduce a listener on the component to run the functions needed, feel free to open a PR to add this

@vforvasile
Copy link
Contributor

Hey @jeremybarbet!

Amazing job with the library, found out about it on reddit and switched from react-native-reanimated-bottom-sheet right away.

Any ETA on dynamic height feature?

On a separate issue, is there any method of overlaying something on the Modalize with an absolute position that won't move on scroll? Header/footer components don't really do the job for me, they're scroll dependant.

@jeremybarbet
Copy link
Owner

Hi @vforvasile, thank you for using Modalize.

No, I don't have any ETA. I'm trying to work on it when I have a bit of time, but I'm quite busy. If you have any idea how to fix this, I would be happy to review your PR!

You can use position absolute on the Header/Footer components so they will be on top of the scrollview, and will stay fixed. You have an example here: https://github.com/jeremybarbet/react-native-modalize/blob/master/examples/expo/src/components/modals/AbsoluteHeader.js#L9-L24

@jeremybarbet jeremybarbet mentioned this issue Mar 27, 2020
10 tasks
@vforvasile
Copy link
Contributor

vforvasile commented Mar 27, 2020

@jeremybarbet , I tried this approach, it works well if you open Modalize at full height, if you have a snap point then the FlatList will move with the absolute element.

I tested with a new prop childOverlay in renderModalize(), by setting zIndex over 100 and absolute styling (bottom:0) to childOverlay I'm passing

Screen Shot 2020-03-27 at 19 53 07

Now it works even if I scroll up/down, move from snap point to full mode

@jeremybarbet
Copy link
Owner

Would you mind creating a PR to introduce this new props?

@vforvasile
Copy link
Contributor

on it!

@jeremybarbet
Copy link
Owner

Now able to toggle the prop and re-calculate the height https://b.ueno.is/p9uK9P5d Fixed in rc-17.

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

No branches or pull requests

3 participants