Since the TextField in compose still in developmen...
# compose-ios
c
Since the TextField in compose still in development, can we interop UITextField to use instead?
i
Take a look at BasicTextField, you can use that from compose.
c
Yea I know right. TextField on compose iOS still have some issues.
d
You also can try to use ComposeUITextField
Copy code
/**
 * Compose wrapper for native UITextField.
 * @param value the input text to be shown in the text field.
 * @param onValueChange the callback that is triggered when the input service updates the text. An
 * updated text comes as a parameter of the callback
 * @param modifier a [Modifier] for this text field. Size should be specified in modifier.
 */
@Composable
fun ComposeUITextField(value: String, onValueChange: (String) -> Unit, modifier: Modifier) {
Pay attention to this line:
@param modifier a [Modifier] for this text field. Size should be specified in modifier.
For example:
Copy code
var textState = remember{ mutableStateOf("Hello") }
ComposeUITextField(textState.value, {textState.value = it}, Modifier.width(100.dp).height(30.dp))
But we are working hard to make material TextField function more stable!
c
This is helpful!!!
f
@Dima Avdeev are there any roadmap for that??? I would like to check.
d
I am currently working with TextFields. And plan to work with it next 3 months.
f
ok, thanks. Good work for you