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 does not work if a parent size is determined by child dimensions #3929

Closed
jjshammas opened this issue Nov 5, 2015 · 3 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jjshammas
Copy link

I have noticed that if:

  • A parent element does not have an explicit width/height
  • AND A child element (such as a text layer) determines the width and height of that parent

…then all flex box properties (such as centering or growing) completely break on both the parent and its children.

This has forced me to attach functions to the onLayout prop and place explicit widths/heights on the parent when React calculates its size.

Is this by design? I am running into this issue nearly every day.

@grabbou
Copy link
Contributor

grabbou commented Nov 6, 2015

Could you provide a React Native Playground example with reproduced issue? Thanks!

@hufeng
Copy link

hufeng commented Nov 9, 2015

maybe it's a bug. #1234

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/flexbox-does-not-work-if-a-parent-size-is-determined-by-child-dimensions

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants