Passing onEnterPressed on to TextField
This commit is contained in:
parent
1970eff09a
commit
2ba1b52a80
|
@ -30,6 +30,7 @@ fun <T> AutocompleteTextField(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
textFieldFocus: FocusRequester = remember { FocusRequester() },
|
textFieldFocus: FocusRequester = remember { FocusRequester() },
|
||||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||||
|
onEnterPressed: (() -> Unit)? = null,
|
||||||
leadingIcon: @Composable (() -> Unit)? = null,
|
leadingIcon: @Composable (() -> Unit)? = null,
|
||||||
fetchSuggestions: suspend (query: String) -> Collection<T> = { emptyList() },
|
fetchSuggestions: suspend (query: String) -> Collection<T> = { emptyList() },
|
||||||
suggestionContent: @Composable (T) -> Unit
|
suggestionContent: @Composable (T) -> Unit
|
||||||
|
@ -102,7 +103,8 @@ fun <T> AutocompleteTextField(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
leadingIcon = leadingIcon
|
leadingIcon = leadingIcon,
|
||||||
|
onEnterPressed = onEnterPressed
|
||||||
)
|
)
|
||||||
|
|
||||||
// due to a bug (still not fixed since 2021) in ExposedDropdownMenu its popup has a maximum width of 800 pixel / 320dp which is too less to fit
|
// due to a bug (still not fixed since 2021) in ExposedDropdownMenu its popup has a maximum width of 800 pixel / 320dp which is too less to fit
|
||||||
|
|
Loading…
Reference in New Issue