Nikola Milovic
08/18/2021, 7:09 AMval model by component.models.subscribeAsState()
val profile = model.profile
val about = remember { mutableStateOf(TextFieldValue(profile.about)) }
val email = remember { mutableStateOf(TextFieldValue(profile.email)) }
Firstly the values for about and email are "" empty string but later on they get updated and the state updates. Is there a way to achieve this behaviour?
As I need this values later on for values in my textfields
TextField(
value = email.value,
onValueChange = { email.value = it },
label = { Text("Email") },
readOnly = !isEditing
)
Luis
08/18/2021, 7:40 AMonValueChange = { component.updateEmail(it) }
on your text fieldsLuis
08/18/2021, 7:41 AMNikola Milovic
08/18/2021, 7:45 AM