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

Flexbox gap not working on <ScrollView> #36024

Closed
lgibso34 opened this issue Jan 31, 2023 · 2 comments
Closed

Flexbox gap not working on <ScrollView> #36024

lgibso34 opened this issue Jan 31, 2023 · 2 comments

Comments

@lgibso34
Copy link

Description

The gap, rowGap, and columnGapstyle properties have no effect on a<ScrollViewwhile it works fine on a`

Version

0.71.1

Output of npx react-native info

n/a

Steps to reproduce

Apply rowGap to a scroll view with multiple children.

Examine no effect.

Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@theprocessor/48401f

@lovelytingy
Copy link

Hi @lgibso34
You are passing rowGap prop to the main container style of ScrollView, that's why it's not working. You need to pass rowGap prop to the contentContainerStyle prop of ScrollView so that style applies on the children you passed to ScrollView.

like this:

contentContainerStyle={{
      rowGap: 16
}}

@lgibso34
Copy link
Author

lgibso34 commented Feb 1, 2023

Thank you. Have not heard of that prop.

New to RN.

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

No branches or pull requests

3 participants