-
Notifications
You must be signed in to change notification settings - Fork 1
How to set up a scrollview in interactive element? #2
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
Comments
Use my package. react-native-interactive on npm. Try putting the Interactive.View inside the ScrollView. If that doesnt work its probably because of problems with how Interactive.View captures touch events in which case I suggest using a PanResponder. Alternatively you can make the Interactive.View "scrollable" by including the translateY param on the transform style prop. |
We're you able to take a look at the snack? I can't get it to work with interactive... |
The reason is that interactive requires native modules which usually cannot be linked on snack. Also there is no ScrollView |
Oh ok. Either way, how would you modify the code on the snack to do what we want it to do? Intuitively it doesn't make sense to put the interactive in a scrollview. Should it be more like (interactive->scrollview->interactive)? |
I'm not goning to write code for you. No, interactive captures touch events - you'll have better luck with PanResponder. Google ScrollView in a pan responder. |
I'm not asking you to write code. I'm asking for clarification because what you were saying wasn't making much sense with the use case. But thanks for your help. I'll look into PanResponder. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
react-native:
60.4react-native-interactable(interactive):
0.1.15Context
Trying to make a bottom sheet type interactive element
Expected Behavior
ScrollView should work as expected.
Actual Behavior
...Scrollview does not work as expected...
Steps to Reproduce
Can't seem to get a snack working: https://snack.expo.io/S1uwiRtLB
It's the map example from Interactable. Just copy and paste the inner content a few times and add a scrollview. Profit.
The text was updated successfully, but these errors were encountered: