Drawio – How to Collapse Nested Container and Other Elements

draw.io

I want to represent a nested element structure, that is collapsible.

I have achieved that, however I am struggling with adding additional element. New elements are not collapse anymore. I tried to play around with the group/ungroup functionality, but I must be missing something. Any tips?

Before collapsing: enter image description here

After collapsing: enter image description here

How can I force element 5 to be collapse together with element 1?

Best Answer

I ran into this issue. The fix for me was to move the item from inside the container to anywhere outside the container.

Then place the item back into the container. Make sure that when you are hovering the item over the container (before you drop it) the container gets highlighted - letting you know that its in a selected state.

It seems the item you placed in the container did not get recognized as being in the container, but instead as being on top of the container.

I hope this helps and works for you.