Adam Brown
01/31/2023, 5:05 AMChildren
composable, it subtly breaks certain things. I don't have a minimal case repro yet, but let me explain:Children(
modifier = modifier,
stack = routerState,
animation = stackAnimation { _, _, _ -> fade() },
) {
when (val child = it.instance) {
is ProjectRoot.Destination.EditorDestination ->
ProjectEditorUi(component = child.component, isWide = isWide, drawableKlass = drawableKlass)
is ProjectRoot.Destination.NotesDestination -> {
var textValue by remember { mutableStateOf("imagine this is enough text to make this scrollable") }
// Try to scroll this textField with the middle mouse button on desktop after switching to it
TextField(
modifier = Modifier.fillMaxSize(),
value = textValue,
onValueChange = { textValue = it },
)
}
is ProjectRoot.Destination.EncyclopediaDestination ->
EncyclopediaUi(child.component)
}
}
Children
and try again, see that it does scroll now.Arkadii Ivanov
01/31/2023, 7:58 AMscrollable
modifier?Adam Brown
01/31/2023, 5:22 PMTextField
doesn't need scrollable though, in fact it breaks TF's own built in scrolling if you add oneArkadii Ivanov
02/04/2023, 1:40 PMChildren
function uses movableContentOf
, which breaks scrollable content inside it on switching.
Here is the related Decompose bug for tracking - https://github.com/arkivanov/Decompose/issues/326