If I try to specify the width of a TextField, it s...
# compose
p
If I try to specify the width of a TextField, it sets the editable section to that width, but centres it in a fixed-width container. Is this expected behaviour? It's certainly not what I expected...
Copy code
Column {
  TextField(value = "", onValueChange = { }, label = {}, modifier = Modifier.width(50.dp))
  TextField(value = "", onValueChange = { }, label = {}, modifier = Modifier.width(100.dp))
  TextField(value = "", onValueChange = { }, label = {}, modifier = Modifier.width(150.dp))

}
z
You can specify the gravity for the children to change that centering behavior
1
v
Although, there is some inconsistency across the composables when it comes to the default behavior.