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

modal doesn't close on scroll down #194

Closed
enniel opened this issue May 6, 2020 · 6 comments
Closed

modal doesn't close on scroll down #194

enniel opened this issue May 6, 2020 · 6 comments
Labels
❔ Question Further information is requested

Comments

@enniel
Copy link
Contributor

enniel commented May 6, 2020

Hi! The modal doesn't close on scroll down when I use it with react-native-snap-carousel.

Reproduce
https://snack.expo.io/@enniel/modal-carousel

Dependencies:

  • react-native-modalize 2.0.0
  • react-native 0.62.2
  • react-native-gesture-handler 1.6.1
  • react-native-snap-carousel 3.9.0
@jeremybarbet
Copy link
Owner

jeremybarbet commented May 6, 2020

Hi!

Unfortunately, I'm not expecting all third-party library to work out of the box with Modalize. Gestures are really complex and using Modalize with a heavy gesture-based library like react-native-snap-carousel will create conflict.

I have been able to make the ScrollView working using the customRenderer and wrapping Carousel with an Animated Component: https://snack.expo.io/@jeremdsgn/modal-carousel

However, the swipe down gesture is not working. Looks like the events needed for Modalize to work are not allowed to be passed down as props in the carousel.

There is an example available with react-native-tab-view if it can help you to move to another library

@jeremybarbet jeremybarbet added the ❔ Question Further information is requested label May 6, 2020
@enniel
Copy link
Contributor Author

enniel commented May 6, 2020

@jeremybarbet I created a simple example using only ScrollView instead react-native-snap-carousel. react-native-tab-view doesn't work for me, since I need independent scrolling in every slide.

@jeremybarbet
Copy link
Owner

Alright, yeah it looks like that the horizontal={true} is the culprit. I honestly don't know how to tackle this kind of problem.

It's quite similar to the inverted={true} props on the FlatList. This is some props that must change the core of Modalize to be able to handle these cases, not sure how to fix those.

@enniel
Copy link
Contributor Author

enniel commented May 6, 2020

@jeremybarbet
Copy link
Owner

Nicely done, it's pretty cool! I might add it to the examples documentation.

@jeremybarbet
Copy link
Owner

I believe this issue can now be close?

@enniel enniel closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❔ Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants