I've got a lazy column of text lines wrapped with ...
# compose-desktop
a
I've got a lazy column of text lines wrapped with a SelectionContainer. It works quite nicely as long as I don't scroll, if I scroll, the selection simply stops randomly, like if I released the mouse click. I think there was an issue related to this but I haven't been able to find it, I'll create one otherwise. Sample to reproduce it:
Copy code
SelectionContainer {
        LazyColumn {
            items(100) {
                Text("Line number $it")
            }
        }
    }
I've also noticed some items can be skipped like in the attached image. Text selection in lazy columns is quite buggy in general, not sure if I can do something to improve it. CodeViewer demo has the same issue.
Playing around this issue a bit more, I've found that it happens whenever the first items selected is scrolled out (so no longer visible). Yikes
The issue seems to be present also in Android
a
this feels like a compose issue than desktop specific. i would have mentioned in in #compose or open an issue if i were you
a
Yeah, I've done it. In case someone else is interested: Compose chat message: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1668256814437359 Google issue tracker: https://issuetracker.google.com/issues/258781270
112 Views