I copy-pasted the following code into my sample app and it doesn't have the desired outcome of setting the height of the row to the height of the text.Since the time the example was written Modifier.preferredHeight(intrinsic) was deprecated and replaced by just Modifier.preferredHeight(intrinsic).
I was working on a similar situation and I fixed it by just adding
on the parent as you have done. So based on my knowledge it should work. But I think I have missed one step in the process since even though I fixed this issue in one part of my app, I could not do the same on other parts of my app by adding
on the parent and
on the parent.So I hope someone helps us both here 😫
1 year ago
@YASAN Thanks for following up. I think the cause of our confusion is that there are different results in the Compose Preview (and CodeLab) than if it were run.The intrinsic Compose Preview renders correctly with the example code: