Container not shrinking when contents is collapsed

I have just moved over to studio, and struggling with a collapsing issue.

I have a container with a repeater inside, and a text box. The idea is when there is nothing for the repeater to display, the repeater is collapsed and the text box is shown. The text is smaller than the repeater, so the height of the container should decrease to just fit around the text box.

I have understood the textbox and repeater need to be made into a stack so that the text box will move up when the repeater is collapsed, however the container is still not shrinking. Can anyone explain how to make this work please?

This was relatively easy in the wix editor, but I’ve hit a wall in studio!

Thanks in advance!

The below image is what happens when the repeater is collapsed.