Justin Xu
05/10/2024, 3:27 AMBasicTextField
with a decoration box
Box(modifier = Modifier.width(IntrinsicSize.Min)) {
if (text.isEmpty() && placeholder.isNotEmpty()) {
H1Text(
text = placeholder,
fontSize = fontSize,
maxLines = 1,
overflow = TextOverflow.Visible
)
}
innerTextField()
}
so that the text field is only as wide as the text or placeholder inside. However, this results in the first letter being cut off, picture attached below. Is there a way to fix this?