How to change group/shape size dynamically?

I have a list of sections, each section has a list of items. I want to show the list of sections and when a user clicks on a certain section it will open (with a toggle) to show all the section’s items underneath it

How can I set the size of the group/background shape so that it will match all the items (different # of items in each section)?

If I understand correctly what you’re asking, you can do this easily by hiding/showing the various groups (I’d recommend by using custom states and conditionals), and having the ‘Collapse When Hidden’ option selected for each of the elements.

That way hidden elements won’t take up any space, and their height will collapse. The parent element will automatically resize to fit the content which is visible inside it.

Taking advantage of the friend’s question above, would you know if it is possible using CSS? It is like!? I’m using javascript with document.getElementById(“myTask”).style.width = " px"; but it has not served me in an RG he is modifying the only elemt. timeline idea

make the changes but in the same element:

does not work: