alexzhirkevich / compose-cupertino

Compose Multiplatform UI components for iOS (Cupertino Widgets)
Apache License 2.0
1.04k stars 34 forks source link

Unable to open CupertinoSwipeBox in LazyList #53

Open kalist28 opened 3 months ago

kalist28 commented 3 months ago

In a long list where all the elements are wrapped in CupertinoSwipeBox, flipping to the bottom when trying to open in any direction, the box closes automatically

Item code:

item(key = "key") {
    val boxState = rememberCupertinoSwipeBoxState()
    CupertinoSwipeBox(
            modifier = Modifier.fillMaxWidth(),
            state = boxState,
            items = {
                when {
                    boxState.dismissDirection.isTowardsStart -> { ... }
                    else -> Unit
                }
           }
    ) { ... }
}

If you remove the binding on dismissDirection in items, everything works fine

boxState.dismissDirection.isTowardsStart

Why is this happening yet I don't understand

alexzhirkevich commented 3 months ago

Thanks, i'll take a look