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 inside card #63

Closed
haveamission opened this issue Oct 24, 2021 · 4 comments
Closed

ScrollView inside card #63

haveamission opened this issue Oct 24, 2021 · 4 comments

Comments

@haveamission
Copy link

haveamission commented Oct 24, 2021

Is it possible to have a ScrollView that works inside a card?

I want to essentially have my arbitrary card, let me give a toy example:

<View>
...contents
</View>

And among those contents, I want to have a <ScrollView /> that scrolls. Right now when I try to scroll on the scrollview, I can't, it just drags the card.

@thekundan2022
Copy link

thekundan2022 commented Jul 25, 2022

Hi @haveamission
Have you got any solutions for this..?

@haveamission
Copy link
Author

@thekundan2022 Yeah, it was some convoluted thing with gesture handling if I recall correctly.

I'll take a look at the code a bit later today and see what I ended up doing exactly.

@haveamission
Copy link
Author

So as far as I can tell, I just put this into the ScrollView (and also the child View, but I don't think that was necessary):

              onStartShouldSetResponder={() => true}
              onTouchEnd={e => {
                e.stopPropagation();
              }}

Let me know if that helps

@webraptor
Copy link
Owner

#22

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

No branches or pull requests

3 participants