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

What if the number of items does not exactly fill a row? #3

Open
alexbepple opened this issue Feb 26, 2016 · 2 comments
Open

What if the number of items does not exactly fill a row? #3

alexbepple opened this issue Feb 26, 2016 · 2 comments

Comments

@alexbepple
Copy link

Say, you have 4 items, and there is only room for 3 items per row. Where would the last item appear? Centered or to the left? Your flexbox props make me think that it would be in the center. But then, it’s not a real grid, is it? ;)

If I am assuming correctly, do you have any clever ideas on how to do that (make the last item go to the left) and still benefit from the benefits of justifyContent values like 'center' and 'space-between'?

@yelled3
Copy link
Owner

yelled3 commented Feb 29, 2016

hi @alexbepple
not sure really... did you try doing alignSelf: 'flex-end' on the last row?
if you get this working, open a PR and I'd be happy to add it as an additional example :-)

@ryanthegiantlion
Copy link

Tried a bunch of options to get the items stacking left. alignSelf: 'flex-end' doesn't work because we have flexDirection: 'row' on the listView which means alignment works vertically.

I am not sure there is an elegant solution for this but I came up with options using flex and dimensions that work.

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