How can one stop a text field from expanding as yo...
# compose-desktop
n
How can one stop a text field from expanding as you type something inside it that goes beyond its width? It would be nice for the text to scroll left as you type more into the text field.
Copy code
OutlinedTextField(
            value = emailState.value,
            onValueChange = { emailState.value = it },
            placeholder = {
              Text(
                text = "email",
                fontSize = 20.sp,
                fontStyle = FontStyle.Normal,
                fontFamily = FontFamily.Monospace,
              )
            },
            colors =
              TextFieldDefaults.textFieldColors(
                textColor = Color.Black,
                backgroundColor = Color.White,
                focusedIndicatorColor = Color.Transparent,
                unfocusedIndicatorColor = Color.Transparent,
                disabledIndicatorColor = Color.Transparent,
                cursorColor = Color.Black
              ),
            textStyle =
              TextStyle(
                fontSize = 20.sp,
                fontStyle = FontStyle.Normal,
                fontFamily = FontFamily.Monospace,
              ),
            maxLines = 1
          )
In case anyone was wondering, I opted for wrapping the text field in an "invisible" box which constrains the textfield dimensions.