Fix keyboard enter action

Close #813
This commit is contained in:
MM20 2024-05-10 13:53:34 +02:00
parent a065e715f3
commit f09c66f919
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -177,15 +177,9 @@ fun SearchBar(
value = value, value = value,
onValueChange = onValueChange, onValueChange = onValueChange,
cursorBrush = SolidColor(MaterialTheme.colorScheme.primary), cursorBrush = SolidColor(MaterialTheme.colorScheme.primary),
keyboardOptions = KeyboardOptions( keyboardOptions = KeyboardOptions(imeAction = ImeAction.Go),
imeAction = if (onKeyboardActionGo == null) {
ImeAction.Search
} else {
ImeAction.Go
}
),
keyboardActions = KeyboardActions( keyboardActions = KeyboardActions(
onGo = onKeyboardActionGo onGo = onKeyboardActionGo,
) )
) )
} }