Skip to content

Commit

Permalink
[UPDATE] TextField - Allow customization of the capitalization of the…
Browse files Browse the repository at this point in the history
… keyboard
  • Loading branch information
Tweener committed Dec 13, 2024
1 parent 99a8596 commit 71d561b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ fun TextField(
enabled: Boolean = true,
singleLine: Boolean = false,
imeAction: ImeAction = ImeAction.Default,
capitalization: KeyboardCapitalization = KeyboardCapitalization.Sentences,
keyboardActions: KeyboardActions = KeyboardActions.Default,
onValueChanged: ((TextFieldValue) -> Unit)? = null
) {
Expand All @@ -134,7 +135,10 @@ fun TextField(
textStyle = size.textStyle,
singleLine = singleLine,
visualTransformation = visualTransformation,
keyboardOptions = inputType.keyboardOptions.copy(imeAction = imeAction),
keyboardOptions = inputType.keyboardOptions.copy(
imeAction = imeAction,
capitalization = capitalization,
),
keyboardActions = keyboardActions,
shape = size.shape,
leadingIcon = inputType.leadingIcon?.let { { Icon(modifier = Modifier.size(size.iconSize), imageVector = it, contentDescription = null) } },
Expand Down

0 comments on commit 71d561b

Please sign in to comment.