Skip to content

Commit

Permalink
fix: enter in contacts search field creates new line (closes #350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Dec 12, 2023
1 parent a8399b1 commit 391a212
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Search
Expand All @@ -23,6 +25,7 @@ import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.unit.dp
import com.bnyro.contacts.R
import com.bnyro.contacts.obj.ContactData
Expand Down Expand Up @@ -94,7 +97,8 @@ fun ContactSearchScreen(
colors = TextFieldDefaults.colors(
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent
)
),
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done)
)
ContactsList(
contacts = visibleContacts,
Expand Down

0 comments on commit 391a212

Please sign in to comment.