Adjust repeater height to collapsed element

https://www.wix.com/corvid/forum/community-discussion/adjust-repeater-height-to-collapsed-element
I have the same problem like this one, but it seems no answer yet and unfortunately, the discussion is closed. This is not a problem if you don’t edit the repeater/container width though.

If there is nothing in your gallery, then in theory is your repeater then shown as empty?
If it is, then you simply need to be collapsing your repeater and not any elements inside of it.
As shown in the links already provided in the links on that closed post.

Im using input element that collapsed/expand when I click button. But the height of container in repeater still the same. and causing blank space.