Josh Feinberg
06/20/2023, 6:49 PMLazyColumn
but i'm now trying to add in a "sticky column" but if i "share" the LazyListState
it seems I can't get them both to scroll vertically. only the "sticky" one doesJosh Feinberg
06/20/2023, 6:49 PMBox {
Box(modifier = modifier.then(Modifier.horizontalScroll(horizontalScrollState))) {
LazyColumn(state = verticalLazyListState) {
...
}
}
if (hasLazyColumn) {
LazyColumn(state = verticalLazyListState) {
...
}
}
}
Josh Feinberg
06/20/2023, 6:50 PMLaunchedEffect(verticalLazyListState) {
snapshotFlow { verticalLazyListState.firstVisibleItemScrollOffset }
.collect {
stickyLazyListState.scrollToItem(verticalLazyListState.firstVisibleItemIndex, verticalLazyListState.firstVisibleItemScrollOffset)
}
}
but it gets really off sometimes when trying to sync the two states together so would love a better solutionOleksandr Balan
06/21/2023, 9:58 AMLazyTable
?
https://github.com/oleksandrbalan/lazytable
It has pinConfiguration
lambda to specify how many columns / rows should be "pinned" (act like sticky)
I am not sure if it fits your needs, but I will be very happy for any feedbackJosh Feinberg
06/21/2023, 4:56 PMOleksandr Balan
06/21/2023, 5:51 PMJosh Feinberg
06/22/2023, 4:51 AMOleksandr Balan
06/22/2023, 8:52 AMJosh Feinberg
06/23/2023, 4:53 AM