Hasan Nagizade
01/04/2023, 12:37 PMonFocusChanged is not getting triggered every time user clicks on InputField ? how to make InputField get focus every time user clicks on it?Zun
01/04/2023, 1:02 PMHasan Nagizade
01/04/2023, 1:07 PMonFocusChanged even if the InputField have it. I could do that by using clickable modifier but that modifier doesn't work when I have onFocusChanged modifier.Albert Chang
01/04/2023, 4:26 PMMutableInteractionSource to observe focused state.
val interactionSource = remember { MutableInteractionSource() }
val isFocused by interactionSource.collectIsFocusedAsState
TextField(interactionSource = interactionSource)Hasan Nagizade
01/04/2023, 8:03 PMZach Klippenstein (he/him) [MOD]
01/04/2023, 9:28 PMonFocusEvent. The onFocusChanged docs say this:
Copy codeNote: If you want to be notified every time the internal focus state is written to (even if it hasn't changed), use [onFocusEvent] instead.