Can some one please explain why without adding the...
# compose
k
Can some one please explain why without adding the weight to TextField it occupies the whole space and icon doesn't render?
Copy code
Box(modifier = modifier.drawShadow(shape = RoundedCornerShape(5.dp), elevation = 1.dp), padding = 16.dp) {
        Row(Modifier.fillMaxWidth()) {
            TextField(value = model.text, onValueChange = { data -> model.text = data }, modifier = Modifier.weight(1f))
            Icon(Icons.Filled.Search, tint = Color.Red)
        }
    }
m
TextField
is currently filling the available width. If it does not have a weight, the available width for it is the entire width/`Box`. I believe this behavior will go away. CC @Siyamed
👍 1