title: Jetpack compose layout changes in dialog doesn't update the size
body: <p>I've got a dialog where the user can select something and depending on the choice, the layout will be updated. The problem is that the height of the dialog is never updated to reflect the layout changes.</p>
  <p>How to recompose the dialog to make the layout fit in the dialog?</p>
  <p>Example:</p>
  <pre><code>@Composable
  fun AlertDialogTest() {
      var showDialog by remember { mutableStateOf(false)}
      var showExtra by remember { mutableStateOf(false)}
      Button(onClick = { showDialog = true }) {
          Text(&quot;Open dialog&quot;)
      }
      if (showDialog) {
          AlertDialog(
              text = {
                  Column { Button(onClick = {showExtra = true}) {
                          Text (&quot;Show rest of dialog&quot;)
                      }
                      if (showExtra) {
                          Text(&quot;More text&quot;, style = MaterialTheme.typography.h5)
                          Text(&quot;Even more text&quot;, style = MaterialTheme.typography.h5)
                      }
                  }
              },
              confirmButton = { TextButton(onClick = { showDialog = false }) {
                  Text(&quot;Close&quot;)
              }},
              onDismissRequest = {showDialog = false},
          )
      }
  }
  </code></pre>
  <p>And the result:</p>
  <p><a href="https://i.stack.imgur.com/0TYSy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0TYSy.png" alt="enter image description here" /></a></p>