aclassen / ComposeReorderable

Enables reordering by drag and drop in Jetpack Compose (Desktop) LazyList & LazyGrid.
Apache License 2.0
821 stars 86 forks source link

[Question] How to Implement Nested Reorderables #266

Open wakaztahir opened 1 year ago

wakaztahir commented 1 year ago

Say I have photoshop like layers where you can create a folder to group those layers , You can reorder the folders (groups) and also reorder layers inside those groups

How can this be implemented using a Lazy List

Let's say layer has just name class Layer(val name : String) and group has a list of layers class Group(val layers : List<Layer>)

and we've been given groups : List<Group> as a parameter , at the current moment I've implemented a list of layers with a drag handle but can't figure out how to implement reorderable groups