Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
foe example in the example provided in
var text by remember { mutableStateOf("Text") }
val handler = remember { Handler(Looper.getMainLooper()) }
OutlinedTextField(
value = text,
onValueChange = {
handler.removeCallbacksAndMessages(null)
handler.postDelayed({
text = it
}, 10)
},
label = { Text("Label") },
modifier = Modifier.fillMaxWidth()
)
When the above function is called, it is not impossible for CoreTextField to know about it. What happens is
- CoreTextField gets value text
- when user types onValueChange is fired
- (developer delays the new value for recompose)
- CoreTextField after onValueChange requests a recompose
- When recompose happens the changed data is passed to developer, and recompose happens with old data (therefore it is not possible to change the cursor location by user either, since it resets to initial value)
Description