Giving a Surface composable a fixed height through...
# compose
k
Giving a Surface composable a fixed height through modifiers does not work. Is that an expected behaviour of the Surface composable or a bug?
m
Can you show me where the Surface is used?
k
Copy code
@Composable
fun EditText() {
    var model by +state { "" }
    Column {
        Surface(modifier = Spacing(16.dp) wraps Height(64.dp),
            border = Border(Color.Black.copy(alpha = 0.25f), 1.dp)) {
                TextField(modifier = ExpandedHeight, value = model,
                    onValueChange = {
                        model = it
                    },
                    textStyle = (+typography()).body1
                )
        }
    }
}
@Mihai Popa here is the code snippet. The height modifier does not make any effect on the surface
m
Thanks, I did some digging and this seems to be a bug in TextField, which does not respect the constraints coming from the modifier
Could you please file a bug with this code snippet?
k
Okay, i will do so
@Mihai Popa you are right. I just did another test, the surface works with other components such as Buttons except the Textfield. I have filed this issue https://issuetracker.google.com/issues/147873046
👍 1