chrisfisher / react-native-directed-scrollview

UNMAINTAINED- see below. A natively implemented scrollview component which lets you specify different scroll directions for child content.
MIT License
149 stars 67 forks source link

Content size not responding to changes in contentContainerSize on iOS with RN 52.2 #30

Open MichaelDanielTom opened 6 years ago

MichaelDanielTom commented 6 years ago

Hey guys, Whenever contentContainerSize changes, the native scrollview's content size stays the same. I think it might have to do with this commit which fixed some bugs, but may have introduced others.

Additionally, when the ScrollView is first mounted, the content seems to be placed correctly, but quickly animates out of the field of view.

Thanks for any help, and great library!

alexlevy0 commented 6 years ago

Same issue here with RN@54.1

MichaelDanielTom commented 6 years ago

@chrisfisher I'm trying to fix this right now, and I was wondering how/why this commit fixed the previous scrolling bug introduced in 0.52. Thanks for any help!

alexlevy0 commented 6 years ago

@MichaelDanielTom I thought it was due to the update of native React and specially to UIManager class

MichaelDanielTom commented 6 years ago

@alexlevy0 Also, which specific problems are you having? Just the contentsize change not being propgated, or jerky movement on mount, or both?

MichaelDanielTom commented 6 years ago

Ok guys, I just made a small fix that should resolve most bugs - I'm not sure what the behavior is on Android yet, nor if this works in all situations on iOS (like with different min/max zoomScales). I also used an api that is kinda marked as internal from RCTScrollView, so I'm not going to make a pr yet with it.

I'll clean it up sometime in the next week and make a proper pr, but hopefully this will help if anyone's looking for a quick fix!

chrisfisher commented 6 years ago

@MichaelDanielTom this commit is a hack which makes the component respond to interactions from RN 0.52 and above. I haven't had time to dig around for a proper fix. Happy to look at merging anything you can come up with.