No need to pass maxLines = 1 if singleline = true anymore.
This commit is contained in:
parent
03273985b2
commit
8d50acaff4
5 changed files with 3 additions and 6 deletions
|
|
@ -208,7 +208,6 @@ internal fun LoginForm(
|
||||||
focusManager.moveFocus(FocusDirection.Down)
|
focusManager.moveFocus(FocusDirection.Down)
|
||||||
}),
|
}),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
maxLines = 1,
|
|
||||||
trailingIcon = if (loginFieldState.isNotEmpty()) {
|
trailingIcon = if (loginFieldState.isNotEmpty()) {
|
||||||
{
|
{
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
|
|
@ -263,7 +262,6 @@ internal fun LoginForm(
|
||||||
onDone = { onSubmit() }
|
onDone = { onSubmit() }
|
||||||
),
|
),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
maxLines = 1,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,6 @@ fun SearchAccountProviderView(
|
||||||
imeAction = ImeAction.Done,
|
imeAction = ImeAction.Done,
|
||||||
),
|
),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
maxLines = 1,
|
|
||||||
trailingIcon = if (userInputState.isNotEmpty()) {
|
trailingIcon = if (userInputState.isNotEmpty()) {
|
||||||
{
|
{
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ fun LabelledTextField(
|
||||||
value: String,
|
value: String,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
placeholder: String? = null,
|
placeholder: String? = null,
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
|
||||||
singleLine: Boolean = false,
|
singleLine: Boolean = false,
|
||||||
|
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||||
onValueChange: (String) -> Unit = {},
|
onValueChange: (String) -> Unit = {},
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ fun OutlinedTextField(
|
||||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||||
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
||||||
singleLine: Boolean = false,
|
singleLine: Boolean = false,
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
shape: Shape = OutlinedTextFieldDefaults.shape,
|
shape: Shape = OutlinedTextFieldDefaults.shape,
|
||||||
colors: TextFieldColors = OutlinedTextFieldDefaults.colors()
|
colors: TextFieldColors = OutlinedTextFieldDefaults.colors()
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ fun TextField(
|
||||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||||
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
||||||
singleLine: Boolean = false,
|
singleLine: Boolean = false,
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
shape: Shape = TextFieldDefaults.shape,
|
shape: Shape = TextFieldDefaults.shape,
|
||||||
colors: TextFieldColors = TextFieldDefaults.colors()
|
colors: TextFieldColors = TextFieldDefaults.colors()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue