[SOLVED] How do you get a RG's cell height to respond to the conditional visibility of an element inside the cell?

I’m currently reviewing App “collapsemenus”. Collapse Menus

I’d like to know how the user who created it got [RG Heading-cell2] to adjust the cell height when [RG Subheading is hidden? When I do that with my nested RG, the original RG-cell2 stays in its position. :frowning:

Anyone else than the creator perhaps?

1 Like

Ok, may I kindly ask @fayewatson to reply to this maybe? Sherlock Holmes advised she’s the creator of above Collapse Menus. :smiley:

1 Like

There is an option to Shrink an elements height when the text gets shorter. So when there is no text, it goes to 0 height.

2 Likes

Aha! Didn’t see the forest…

<— in property editor

Solution-wise, for others reading this post, I can add that this can be done for groups as well. (Y)

Thanks a lot @DaveA!

If @fayewatson doesn’t fancy adding some more magic to this solution, I’ll remove my request for it and clean the topic up a bit.

1 Like

That’s it! :slight_smile: The only thing I would say is to not use separate + and - icons like I did in this one. Instead use one icon that changes from a + to a - (depending on what is visible), and use Element Actions --> Toggle. I have a feeling you are probably already doing that though!

2 Likes

Spot on! I use Hide/Show though.

1 Like

is there a way to apply the same principle to empty image elements?

now when a repeating group’s cell’s image is empty it’s still holding same height even I conditionally hide the element when empty.

thanks!

Hey @erbil88, :slight_smile: One way would be to place the image element inside of its own group, and create a conditional statement on that container group to be hidden when the image value is empty (make sure ‘collapse this element’s height when hidden’ on the group is checked). But, this wouldn’t collapse the repeating group’s cell height beyond its default height, only the amount that the image makes the cell larger.

1 Like