Adjust Container size when we Click Button

I have container name called "dataContainer" (In inspector , Appearance section , selected appearance to be AUTO)

I have Button with name "DataButton"

Now the requirement is , if click DataButton the size of the "dataContainer" needs to resize

Do you mean this section?

image

Unfortunately, there doesn't seem to be a dynamic way to change this (such as there is for Margin for example).

Hi @Keven! To echo @MiguelOrtiz, the heightType attribute on components doesn't have a setter method so we can't programmatically toggle that value.

You can kind of accomplish what you're describing by using a Repeatable component, if that suits your data needs.
image
When using one of these components, you set the data source to an array and then Retool automatically creates a child component for each element of the source. You can then have a button that, when pressed, pushes an element into the source array, thereby causing the container to expand.

If that won't work for your use case, I'd be interested to hear more about what kind of data you're displaying inside the container and the goal behind getting it to expand on button press!