If I’m using a `LazyColumn` that’s being continuou...
# compose-desktop
s
If I’m using a
LazyColumn
that’s being continuously updated with new items at the bottom, how do I keep the scroll locked at the bottom?
m
I haven't tried that but how about setting new scroll position (
scrollToItem()
?) on `LazyListState`when new items are added?
m
There is a reverseLayout parameter for
LazyColumn
, so maybe that will change the alignment of the it scroll position.
s
it throws me off that the scroll functions are all
suspend
m
I guess you can just have a LaunchedEffect with items as key, so whenever they change you scroll to the bottom?
👍 1
z
I think this is what the reverseLayout parameter is for. You'd also need to reverse the order of your list but that's probably easier than hacking the scrolling behavior.