Skip to content

Flex Layout - minWidth property is always used even if more space is available in RN 0.42 #12878

Closed
@brianfoody

Description

@brianfoody

Description

If I have a View with flexDirection row and three children with flex 1 I would expect them to fill up all the space of the parent. However if I add a minWidth property to the child views the minWidth is used and leftOver

Reproduction

https://github.com/brianfoody/react-native-min-width-issue

None of the red view should be displayed as the children should take up all available space

Solution

Sorry I'm not familiar with the underlying layout engine. I'm guessing this is related to the switch to Yoga and possibly percentage width support.

Additional Information

  • React Native version:0.42.0
  • Platform: iOs
  • Operating System: MacOS
  • Dev tools: xCode 8.2.1, Simulator 10 and iPhone 6s 10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions