Hey guys. I switched to compose `1.0.0-beta08` and...
# compose
a
Hey guys. I switched to compose
1.0.0-beta08
and i found a strange issue. When i use my library,
de.charlex.compose:revealswipe:1.0.0-beta04
(RevealSwipe), which implements a
RevealSwipe
, i am not able to swipe the items after scrolling down in a
LazyColumn
. I could fix it by setting
key(myItem) {}
around the
RevealSwipe
. Any ideas? In
compose 1.0.0-beta06
everything worked fine
1
Copy code
Surface(modifier = Modifier.fillMaxSize()) {
    LazyColumn {
        items(
            items = items,
            key = { item -> item}
        ) { item ->
            key(item) { //FIXME Without these key, the RevealSwipe doesn't work after scrolling
                RevealSwipe(
                    hiddenContentEnd = {
                        Image(
                            modifier = Modifier.padding(horizontal = 25.dp),
                            imageVector = Icons.Outlined.Delete,
                            colorFilter = ColorFilter.tint(MaterialTheme.colors.onSecondary),
                            contentDescription = null
                        )
                    }
                ) {
                    Card(
                        modifier = Modifier
                            .fillMaxWidth()
                            .requiredHeight(100.dp)
                        ,
                        backgroundColor = Color.Gray,
                    ) {
                        Box(contentAlignment = Alignment.Center) {
                            Text("Item: $item")
                        }
                    }
                }
            }
        }
    }
}
a
Most likely you faced https://issuetracker.google.com/issues/189825174. If you can share the repro sample in this bug we can make sure your use case is fixed once we have a fix
👍 1
d
Hey @Alexander Karkossa may I ask you how did you manage to make the hidden component clickable while you had a swipable content on top? I've a similar situation with a vertically scroll where my hidden contents aren't clickable. I described it here https://kotlinlang.slack.com/archives/CJLTWPH7S/p1670348015304799?thread_ts=1670348015.304799&cid=CJLTWPH7S