spxbhuhb / adaptive

Consolidated full-stack application development library for Kotlin
https://adaptive.fun
Apache License 2.0
3 stars 0 forks source link

actualBatch does not remove layout items properly #45

Closed toth-istvan-zoltan closed 4 months ago

toth-istvan-zoltan commented 4 months ago

The code below does not work well because when this fragment is removed, the structural that belongs to if uses actualBatch to skip removing all descendants one-by-one.

However, the layout items deeper in the tree are not removed properly from the container that contains welcome.

@Adaptive
fun welcome(withFeedback: Boolean = false) {
    val signUp = copyStore { SignUp() }

    if (withFeedback) {
        row(name("a")) {
            gapWidth { 24.dp }
            mobileExample { welcomeInner(signUp) }
            feedback(signUp)
        }
    } else {
        welcomeInner(signUp)
    }
}