For some reason it does not like this, anyone know...
# compose
j
For some reason it does not like this, anyone know why
Copy code
Box(modifier = Modifier.align(Alignment.CenterHorizontally).fillMaxWidth()){
                TextField(
                    modifier = Modifier.align(Alignment.Center).border(2.dp, Color.Red),
                    singleline = true,
                    label = SongAddition::name.asTextField(),
                    value = songAdditon.state.name,
                    //isError = songAdditon.error.error.isNotEmpty(),
                    //supportingText = {songAdditon.error.error[SongAddition::name] ?: ""},
                    onValueChange = { txt: String ->
                        songAdditon = songAdditon.copy(
                            state = songAdditon.state.copy(name = txt)
                        )
                    })
            }
Using Material 3 btw FIXED : LABEL WAS NOT LAMBDA
j
you're conflicting usage of parameter from multiple TextField. you should remove
singleLine
instead you can add this
maxLines=1
j
yeah i did not need that but singleLine is actually a parameter I can use I think