Colton Idle
07/17/2026, 6:41 PMColton Idle
07/17/2026, 6:42 PM@Composable
fun AppTextField(
value: String,
onValueChange: (String) -> Unit,
placeholder: String,
modifier: Modifier = Modifier,
singleLine: Boolean = true,
minLines: Int = 1,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
keyboardActions: KeyboardActions = KeyboardActions.Default,
visualTransformation: VisualTransformation = VisualTransformation.None,
) {
BasicTextField(
value = value,
onValueChange = onValueChange,
modifier = modifier,
singleLine = singleLine,
minLines = minLines,
keyboardOptions = platformTextFieldKeyboardOptions(keyboardOptions),
keyboardActions = keyboardActions,
visualTransformation = visualTransformation,
)
}
@OptIn(ExperimentalComposeUiApi::class)
actual fun platformTextFieldKeyboardOptions(options: KeyboardOptions): KeyboardOptions {
return options.copy(
platformImeOptions = PlatformImeOptions {
usingNativeTextInput(true)
},
)
}
kotlin = "2.4.10"
composeMultiplatform = "1.11.1"Marcin Kiżewski
07/17/2026, 6:55 PMTextFieldValueColton Idle
07/18/2026, 2:29 AMJonathan
07/18/2026, 4:44 PMTextFieldState overload of BasicTextField? Your video makes it look like you’re experiencing an async update issue tied to how BasicTextField reacted to text changes. You can find a basic explanation here from 2022. The state backed overload is supposed to eliminate this problem.Colton Idle
07/20/2026, 2:41 AM