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

ScrollView doesn't work with adjustToContentHeight #149

Closed
kg-currenxie opened this issue Mar 18, 2020 · 20 comments
Closed

ScrollView doesn't work with adjustToContentHeight #149

kg-currenxie opened this issue Mar 18, 2020 · 20 comments
Labels
📄 Needs repro Issue could be improved with a clear list of steps to reproduce or a snack expo code

Comments

@kg-currenxie
Copy link

kg-currenxie commented Mar 18, 2020

If you use adjustToContentHeight but the content is taller than the screen, the scrollView should work.

2020-03-18 17 07 45

At the moment, I have to turn off adjustToContentHeight on certain modals that I think will be tall enough. But we'll have more dynamic content in some modals, so I won't know.

@jeremybarbet
Copy link
Owner

jeremybarbet commented Mar 19, 2020

Ah crap, it was working before, probably I messed up somewhere, must be.

Which version are you using? I'll look at it

Edit: I tried it running latest version rc.8 and it works using adjustToContentHeight https://b.ueno.is/YEuAeoyy

@kg-currenxie
Copy link
Author

kg-currenxie commented Mar 19, 2020

react-native-modalize": "1.3.7-rc.4", too old?

@jeremybarbet
Copy link
Owner

Would you mind testing the latest? rc.8

@kg-currenxie
Copy link
Author

kg-currenxie commented Mar 19, 2020

Same with rc.8 :/

@jeremybarbet
Copy link
Owner

Can you reproduce the issue on an expo snack?

@jeremybarbet jeremybarbet added the 📄 Needs repro Issue could be improved with a clear list of steps to reproduce or a snack expo code label Apr 10, 2020
@jeremybarbet
Copy link
Owner

@kg-currenxie What’s the status on this issue?

@kg-currenxie
Copy link
Author

Sorry, haven't had the time to create a reproducible thing yet :/ You can close the issue until then if you want to :)

@jeremybarbet
Copy link
Owner

No, it's totally fine to keep it open, I'm just curious to see, since I wasn't able to reproduce on my side.

@danilocanalle
Copy link

I got the same bug.
I need to set disableScrollIfPossible={false} to work the scroll here.

@danilocanalle
Copy link

Maybe I Know @jeremybarbet where is the problem.
I think that children that is not fixed components (like the @kg-currenxie example)
Content that needs to wait a function response,
Your Modal do not know the total height of the content and so disable the scroll.
Mine is the same thing, I Have a function inside the component:

<Modalize ref={popupModalRef} adjustToContentHeight > {getCurrentModal('component')} </Modalize>

It make senses?

@jeremybarbet
Copy link
Owner

@danilo900 I'm not sure if both issues are the same, but your case does make sense. I'm not sure how to handle that though. If you were able to create a repro snack it would be easier to debug.

@danilocanalle
Copy link

@jeremybarbet I Found out the problem

https://snack.expo.io/@bookplay/react-native-modalize-bug-height

The HeaderComponent is bugging the Modal on this situation.

Try on snack, with header its going to bug the scroll.
If you remove the header, its going to work perfectly.

:/

@jeremybarbet
Copy link
Owner

jeremybarbet commented May 5, 2020

Good catch! Usage of XComponent was the culprit. It should be fixed now, I will release asap.

About the async function that loads data before showing up should be on a new separated issue

Edit: Released in 2.0.0

@kg-currenxie
Copy link
Author

2.0.0 works 🎉 thanks <3

@danilocanalle
Copy link

Yeaaa, worked perfectly! @jeremybarbet you are awesome ! <3

About the async function, forget that, its working here :D
On my example it already was with the method that I said :)

@raheelCb
Copy link

same issue causing me in your current release

@danilocanalle
Copy link

Are you testing on Android?
I Got the error on Android, on iOS its ok.

Reported here:
#219

@raheelCb
Copy link

Yes I am testing on android

@raheelCb
Copy link

Are you testing on Android?
I Got the error on Android, on iOS its ok.

Reported here:
#219

One more issue I am facing is that when I load my component. If the content is more than the height, then it first automatically scroll up and then to the snap point where I have adjusted it to be on certain position

@danilocanalle
Copy link

Yes I am testing on android

Yea, so its related to my new issue. #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 Needs repro Issue could be improved with a clear list of steps to reproduce or a snack expo code
Projects
None yet
Development

No branches or pull requests

4 participants