How to force text field to lose focus? I can't exi...
# compose
b
How to force text field to lose focus? I can't exit edit state after ime action etc
4
r
The user can click outside the text field to clear focus. If you want to clear focus programatically you can do the following:
Copy code
// Fetch the focusmanager ambient by using this statement within a @Composable function.
val focusManager = AmbientFocusManager.current

// Use this function to clear focus.
focusManager.clearFocus()