Why does `LazyColumn` do a “double step” scroll wh...
# compose
u
Why does
LazyColumn
do a “double step” scroll when calling
animateScrollToItem (0)
? I would expect one smooth scroll like recycler used to do.
s
Can you take a video and share some minimal reproducing code? This double step isn't something I'm familiar with
Based on a hunch and your last question, are you supplying an "key" function to your
LazyColumn.items(...)
call? By default, LazyColumn tries to key the content by its index in the list but this approach isn't always appropriate. Since you're inserting new data into the top of the list, the list indexes become unstable and you need to supply a unique ID here. https://developer.android.com/develop/ui/compose/lists#item-keys
u
yes im overriding key ofc