allan.conda
11/10/2020, 4:17 AMonValueChange
recovers the previous value. Is there a right way to do this or should I file a bug?
var value by remember { mutableStateOf("") }
OutlinedTextField(
value = value,
onValueChange = {
value = it
},
)
Button(onClick = {
value = ""
}) {
Text("Clear")
}
// user types "abc"
// textfield: [ abc ]
// user presses clear
// textfield: [ ]
// user types d
// expected: [ d ]
// actual: [ abcd ]