I keep running into an issue with flex containers and flex repeaters not calculating the size correctly when using the ‘auto’ basis. I saw and responded to another post with this same or a very similar issue, but I searched and didn’t see any posts directly discussing this as a bug. Here is a simple example showing what I’m talking about:
This is the structure for the view:
The relevant position props:
- root (Flex row): width: 200, height: 50
- FlexContainer (row): grow: 0, shrink: 0, basis: auto
- Icon: grow: 0, shrink: 0, basis: 50px
- Label: grow: 0, shrink: 0, basis: auto (this can also be set to a fixed width and the same issue occurs)
And after scrolling all the way to the right you can see the width of the FlexContainer is the exact width of the label:
If I add margins of 10 on the left and right to the icon and label you can see it will add 40 to the container width, but it still cuts off at the right edge of the label’s text:
I’ve also experienced this with other components in place of the icon such as an empty container and an image. To me this definitely doesn’t seem like intended behavior and has given me trouble with using flex repeaters as well as grouping components together that are intended to run the same script, open the same popup when hovered over, etc. Maybe I’m just overlooking something, but I’ve messed around quite a bit with the relevant props and haven’t gotten anything to work.