Hi there! Is the scrolling in Compose for desktop ...
# compose-desktop
m
Hi there! Is the scrolling in Compose for desktop supposed to be working? I’m not doing anything special from what I see, just:
Copy code
LazyColumn(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = modifier) {
    items(users) { user ->
        UserItem(user = user, modifier = Modifier.fillMaxWidth())
    }
}
It’s scrolling vertically alright on Android, but not when running via JVM on Desktop. Any hints at what I’m missing? I’m using Compose Multiplatform 1.10.1 and JDK Temurin 21.
1
s
Scrolling works fine. Make sure you're using the scroll wheel and not drag-to-scroll (ask me how I know)
🤣 5
m
OMG, of course 🙈 🤯 It works! I was so expecting for it to be scrolling with drag-to-scroll… 🤷‍♂️
Thank you! ❤️
s
Hey. Been there done that lol
😄 3
that's how I knew right away ahahah
m
FWIW, I use Compose Unstyled's `ScrollArea()` to add scrollbars, which work on desktop
❤️ 3
s
FWIW Compose 1.11 adds
Modifier.scrollIndicator
so there kind of is a native, cross-platform solution now. But there is no implementation yet 😄 Just the API
Also if you're only doing desktop I'm going to go ahead and suggest you take a look at Jewel to get an IntelliJ-like theme, which works a lot better than Material on desktop
See jewel-ui.dev and #C05T8U2C31T
</self-promo>