Skip to content

FlexboxLayout with default alignItems value is not respecting the container layout width #6676

@NickIliev

Description

@NickIliev

When the FlexboxLayout has no alignItems (or has alignItems="stretch" which is the default value) and the content is wider than the container size it will not fit in this size and will push any existing flex items out of the visible area. This way it will also not respect minWidth values set to one of the flex items.

Playground demo depicting the issue can be found here

Or use the following snippet to reproduce the issue

<GridLayout rows="50, 50" columns="60, *, 50">

    <Label row="0" text=">> 1" col="0" backgroundColor="red" color="white"></Label>
    <FlexboxLayout alignItems="stretch" row="0" col="1" backgroundColor="lightgray">
        <Label text="very very very long long long text content follows here"
            height="100%" backgroundColor="green" color="white" textWrap="false"></Label>
        <Label minWidth="80" height="100%" text="80px" backgroundColor="blue"
            color="white"></Label>
    </FlexboxLayout>
    <Label row="0" col="2" text="50px" backgroundColor="yellow"></Label>

    <Label row="1" text=">> 2" col="0" backgroundColor="red" color="white"></Label>
    <FlexboxLayout alignItems="stretch" row="1" col="1" backgroundColor="lightgray">
        <Label text="short content " height="100%" backgroundColor="green"
            color="white" textWrap="false"></Label>
        <Label minWidth="80" height="100%" text="80px" backgroundColor="blue"
            color="white"></Label>
    </FlexboxLayout>
    <Label row="1" col="2" text="50px" backgroundColor="yellow"></Label>
</GridLayout>

Workaround:

Change the default alignItems value from stretch to flex-start and stretch the items "manually".
Playground demo with the workaround here.
The issue is reproducible only on iOS.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions