I have some business logic that clears the text in...
# compose
a
I have some business logic that clears the text input, however upon typing again,
onValueChange
recovers the previous value. Is there a right way to do this or should I file a bug?
Copy code
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 ]