Hi guys, i'm trying singleLine for Textfield. When...
# compose-android
t
Hi guys, i'm trying singleLine for Textfield. When i paste text has \n to TextField
singleLine = true
it not working(Example in photo). In Android Native, it will auto replace
\n
to
space
when i set singleLine = true for EditText. So i wanna ask TextField in compose has something like that?
b
How do you know that the LogCat out represents the way its drawn in Compose? It might keep the newline for the callback but when rendering ignore it 🙂
t
@Blundell the view also render like LogCat, text \n below textField and i still interact with it
b
ah so the screenshot is your view? not logcat
t
@Blundell u can see this bug in video below
b
I see, so when you paste a new line it renders a new line, you control the text, why not do
text = text.replace("\n", " ")
t
@Blundell i have solution already but i want to ask whether TextField has any property do same EditText in android native just Textfield.something() 😂
In the current BasicTextField I don’t think we handle it at all
❤️ 1