Zoltan Demant
11/27/2023, 8:18 AMLazyColumn
item inside a ModalBottomSheet
? I just find that nothing happens, and I think its because of the sheets half expanded state.xoangon
11/27/2023, 8:23 PMLazyListState::scrollToItem
wasn't performing a scroll at all in my case, while LazyListState::animateScrollToItem
did the work. I guess there's some race condition to update the UI, but I've found no way to make scrollToItem
work.
Does animateScrollToItem
work for you? It's not the greatest UX approach, as I'd rather the scroll to be invisible to the userZoltan Demant
11/28/2023, 5:44 AMrememberLazyListState
? Might be worth filing a bug in either case though!
I suspect my case is odd because effectively the list scroll would need to trigger the sheet to move up the screen (like when dragging it up to see more items) which I dont think it can do at this point. LazyListState::animateScrollToItem
didnt make any difference here. Furthermore, if I populate my list with more items, it kind of scrolls .. just not far enough to make the specified index actually visible.xoangon
11/28/2023, 1:04 PMrememberLazyListState
, I'm creating the state out of the Compose world, hoisting it to an state holder. I'm taking care of notifying Compose of state changes but still LazyListState::scrollToItem
doesn't do the job in my case 😕
I'll see if there's any reports and open one if not. You seem to even be in a worse place than mine with none of the LazyListState
functions doing the job 😵💫Zoltan Demant
11/28/2023, 1:32 PMxoangon
11/28/2023, 1:40 PMrememberLazyListState
as part of my debugging process to see if the error was caused by my implementation. The result was the same, though 🥲Zoltan Demant
11/28/2023, 1:43 PM