Adjust repeater height to collapsed element

Hi!

I have a repeater that’s connected to a dataset and collection, and within the repeater I have a gallery.
It’s not for all items in the collection that has data for the gallery though, so I have created some code that collapses the gallery if there is no data for it.
The code works fine, but the repeater (or container) doesn’t adjust to the lower height accordingly. Now there’s just this big white space.

Is there any way to make the repeater adjust the container height dynamically?

Thank you in advance!

Anders

2 Likes

I’m having the same problem. Hoping someone’s got an answer for us. :slight_smile:

Hi Anders,

Would you be willing to share the code that collapses the gallery if there is no data for it? Much appreciated!

Thanks, Stefan

Anybody got solution?

This is an old post and being closed, add a new forum post if need help still.

Otherwise, simply search the forum and you can find previous posts about collapsing repeater or gallery if dataset empty.
https://www.wix.com/corvid/forum/community-discussion/hiding-an-element-if-a-repeater-is-empty
https://www.wix.com/corvid/forum/community-discussion/hide-a-repeater-if-dataset-is-empty
https://www.wix.com/corvid/forum/community-discussion/hide-repeater-contents-based-on-data
https://www.wix.com/corvid/forum/community-discussion/hide-image-element-if-empty
https://www.wix.com/corvid/forum/community-discussion/hide-collapse-items-that-are-not-present-in-the-database