Closed Breens-Mbaka closed 5 months ago
You can add onFocusChanged
and listen when the textfield's focus changes:
val context = LocalContext.current
DPhoneNumberTextField(
modifier = Modifier
.fillMaxWidth()
.onFocusChanged {
if (it.isFocused) {
Toast.makeText(context, "Focused", Toast.LENGTH_SHORT).show()
}
}
You can add
onFocusChanged
and listen when the textfield's focus changes:val context = LocalContext.current DPhoneNumberTextField( modifier = Modifier .fillMaxWidth() .onFocusChanged { if (it.isFocused) { Toast.makeText(context, "Focused", Toast.LENGTH_SHORT).show() } }
This works great ✅
Closing this as there is nothing that needs to change on the lib
This is to observe interactions in the text field i.e focused