```LazyPagingItems<Episodes>``` How to use ...
# compose
w
Copy code
LazyPagingItems<Episodes>
How to use group by with LazyPagingItems? I want to implement a sticky header list here so i would need to convert this to Map<String,List<Episodes>> here. One way i can think of is using the itemSnapshot list, but not sure if it's a good practice. Any help is appreciated. Thanks.
j
Have a look at the
PagingData.insertSeparators
function, I think that's what you are looking for.
w
Yep I know about this function but how do i actually use this with compose?
Copy code
list.forEach { (k, v) ->
            stickyHeader {
                SeasonHeader(header = k)
            }
            items(v.count()) { key ->
                val item = v[key]
                EpisodeItem(
                    imageUrl =  "",
                    productDescription = ,                  
                )
            }
        }
This is how I'm currently populating the lazycolumn (using itemSnapshotList).