Hi <@UHAJKUSTU> I have a bottom navigation with 4 ...
# decompose
v
Hi @Arkadii Ivanov I have a bottom navigation with 4 tabs A, B, C, D In tab A, I have a pages navigation with two pages A1, A2 and both have a PagingData based lazy column in it Now whats happening is that, If i scroll some items in both the pages, then switch to some other tab B, C etc And come back to A The selected page has the correct scroll state, but the scroll state is lost in the unselected page Same happens if I minimize app and open it again, the scroll state in the unselected page is lost Cc: @लातों वाला भूत
a
Hey! Thanks for reporting. This looks like a bug in HorizontalPager. Could you please try without Decompose? Just create a HorizontalPager with two static pages with a static list inside each page.
v
Same thing happens without Decompose as well
Copy code
@Composable
fun TestPager() {
    val pagerState = rememberPagerState(0){ 2 }
    HorizontalPager(
        state = pagerState,
        modifier = Modifier.fillMaxSize(),
    ){
        TestPage(it)
    }
}

@Composable
fun TestPage(index: Int) {
    val listState = rememberLazyListState()
    LazyColumn(
        state = listState,
        modifier = Modifier.fillMaxSize()
    ){
        items(40) {
            Surface(modifier = Modifier.fillMaxSize()){
                Text(text = "Row $it", modifier = Modifier.padding(16.dp))
            }
        }
    }
}
a
Yeah, thanks for checking! In this case there is nothing I could do here. I suggest asking in #compose and/or filing a bug here : https://issuetracker.google.com/issues/new?component=856989&amp;template=1425922
v
Thanks
👍 1