Thread
#compose
    Tony Kazanjian

    Tony Kazanjian

    1 year ago
    Hey all. So before the alpha 11 update, I was using a 
    ScrollableColumn
     to display a list of a set number of items, i.e.:
    ScrollableColumn(modifier.padding(bottom = 56.dp)) {
        collections.forEach {
            ProductCollection(collection = it)
        }
    }
    The 
    ProductCollection
     essentially contains a composable that is a 
    LazyRow
     for showing 
    LazyPagingItems
    @Composable
    fun ProductItemListWithId(
            collectionId: Int,
            modifier: Modifier = Modifier,
            content: @Composable LazyItemScope.(ProductItem) -> Unit){
        val viewModel: ProductListViewModel = getViewModel()
    
        val products = viewModel.getPagingFlowForCollection(collectionId).collectAsLazyPagingItems()
        LazyRow{
            items(products){
                product -> product?.let { content(it) }
            }
        }
    }
    ScrollableColumn
    has been deprecated now, but it's only the row items that I want lazy loaded. Trying to use a
    LazyColumn
    a la :
    LazyColumn(
            modifier = modifier.padding(bottom = 56.dp)) {
            item {
                collections.forEach {
                    ProductCollection(it)
                }
            }
        }
    Results in the row items not always getting loaded since they are coming from a
    Flow<PagingData>
    that is fired lazily. What can I do to work around this, or to just simply make a normal
    Column
    scrollable again in Alpha 11?
    Nevermind, looks like I answered my own question by actually paying attention to the documentation 😅
    Column(modifier.verticalScroll(rememberScrollState()).padding(bottom = 56.dp)) {
            ...
        }