Forum Documentation Showcase Pricing Learn more

How to hide repeating group if empty

Hello guys, I have a repeating group in my app which I want to hide or collapse height if it doesnt return any results. How can I achieve this?

You can use a conditional statement that if the count of items returned by the repeating group search is zero, hide the repeating group.

that would work yes, but I found a problem which is the fact That I end up with an empty spot. Any way to collapse height?

I may have found out how, I would have to put it inside a group and collapse the group when empty.

1 Like

does not collapse unfortunatly

Collapse group ought to work. I use this feature extensively.

Here’s a quick example:
CloudApp

Hi,

Maybe you can try this.

Put rg in group, set the group collapses when hidden, then set conditional on the group when rg list of … count is 0, this group isn’t visible.

I have tried it out but it does not work. I have seen somewhere that maybe if I have hidden elements on top of that group that may be the reason why it does not collapse.I dont know I really need this to work

If there is an element to the side or on top (in the same vertical space) it won’t collapse that space (just hide the group). Check to see. If so, either redesign to get rid of it, or have it collapse as well.

CloudApp

here is an example of a situation that could be causing the issue you are encountering

I will give it a try

It does work thanks but I still have on element which I cannot move which is a groupfocus and I am not able to collapse. Any idea how to do that?

I’m sorry, but I’m not familiar with the Group Focus element, as I don’t use it.

I’ve found in these situations it is generally better to redesign things to work around these problems (i.e. can you do without the group focus?), rather than trying to force your way through Bubble’s limitations.

A group focus floats above the page relevant to a particular element. It won’t impact the rest of the elements on the page.

I have literally gone and checked all elements, and even though I managed to collapsed the element there is still a space that does not have any element in there and it is black. Breaking my patience into pieces haha