From 93d321507feeec8ac1e767d46f94d545098ebffd Mon Sep 17 00:00:00 2001 From: Rainxch Zed Date: Sun, 4 Jan 2026 11:24:06 +0500 Subject: [PATCH] feat(search): Improve search input field behavior This commit enhances the search input field by: - Explicitly setting the `keyboardType` to `Text`. - Forcing the input to be a `singleLine`. --- .../githubstore/feature/search/presentation/SearchRoot.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/feature/search/presentation/SearchRoot.kt b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/feature/search/presentation/SearchRoot.kt index d7cd1f733..a49362081 100644 --- a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/feature/search/presentation/SearchRoot.kt +++ b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/feature/search/presentation/SearchRoot.kt @@ -54,6 +54,7 @@ import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import githubstore.composeapp.generated.resources.Res @@ -423,10 +424,14 @@ private fun SearchTopbar( textStyle = MaterialTheme.typography.bodyLarge.copy( color = MaterialTheme.colorScheme.onSurface ), - keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search), + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Text, + imeAction = ImeAction.Search + ), keyboardActions = KeyboardActions( onSearch = { onAction(SearchAction.OnSearchImeClick) } ), + singleLine = true, colors = TextFieldDefaults.colors( focusedIndicatorColor = Color.Transparent, unfocusedIndicatorColor = Color.Transparent,