Hello everyone, I have a suggestion to ask you reg...
# compose
a
Hello everyone, I have a suggestion to ask you regarding LazyColumn and nested lists. Nested scrollable is not allowed, but what if I wanted to have a list of cards (probably 10) where each one has an expanded collapse state that shows / hides an internal list? For example, in this codelab each card has the behaviour I am looking for, but it shows / hides a simple composable. A solution is adding an internal column but would it impact the performance if there are a lot of items? Another idea was using item (for the header) and items when expanded, but I am not sure if I can surround them with a card since we are in the LazyListScope which is not composable. Thanks!
j
I don't think is a good practice to have a large list inside a list item, you could find another solution. Btw, you use nested scroll with modifier, it's a little more complex, but maybe can solve your problem. Or simple use column with foreach, I don't think will impact on performance, in case you don't need lazylist achievements
a
Thanks Jhonatan! I was thinking about the foreach, my only concerns were about performance. I will do some tests. Do you mean using column with nested scroll with modifier instead of Lazylist?