Set singleLine to true by default

This commit is contained in:
dankito 2024-08-26 20:34:09 +02:00
parent 3c4a2232e8
commit 2170bbc474
3 changed files with 1 additions and 3 deletions

View File

@ -48,7 +48,6 @@ fun <T> AutocompleteTextField(
Box(Modifier.fillMaxWidth()) {
OutlinedTextField(
value = searchQuery,
singleLine = true,
onValueChange = { query ->
searchQuery = query
onValueChange(null)

View File

@ -30,7 +30,7 @@ fun OutlinedTextField(
visualTransformation: VisualTransformation = VisualTransformation.None,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
keyboardActions: KeyboardActions = KeyboardActions.Default,
singleLine: Boolean = false,
singleLine: Boolean = true,
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
minLines: Int = 1,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },

View File

@ -26,7 +26,6 @@ fun PasswordTextField(password: String = "", label: String = "Passwort", onChang
value = password,
onValueChange = { onChange(it) },
label = { Text(label) },
singleLine = true,
modifier = Modifier.fillMaxWidth(),
visualTransformation = if (passwordVisible) VisualTransformation.None else PasswordVisualTransformation(),
trailingIcon = {