Fix potential error:
Modifier factory functions must use the receiver Modifier instance
This commit is contained in:
parent
a55d3d0ace
commit
cebc06aa5e
1 changed files with 2 additions and 1 deletions
|
|
@ -21,9 +21,10 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.focus.FocusManager
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
|
||||
fun Modifier.clearFocusOnTap(focusManager: FocusManager): Modifier =
|
||||
fun Modifier.clearFocusOnTap(focusManager: FocusManager): Modifier = then(
|
||||
pointerInput(Unit) {
|
||||
detectTapGestures(onTap = {
|
||||
focusManager.clearFocus()
|
||||
})
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue