Repository navigation
Replies: 1 comment
|
Yes—if “share a slot” means several distinct items at the same rank, model each rank as a container with its own list of items, rather than giving several sortable items the same ID or array index. For example, your application state could be: const rows = [
{ id: 'rank-1', items: ['a'] },
{ id: 'rank-2', items: ['b', 'c'] },
{ id: 'rank-3', items: ['d'] },
]Moving The official multiple sortable lists guide is the closest starting point. If you're using the older The part you'll need to design is how a drop means “join this row” versus “create a new row between these two.” Separate row-body and between-row drop zones make that distinction explicit. All row and item drag/drop IDs should remain unique. |
Uh oh!
There was an error while loading. Please reload this page.
Essentially, I'm trying to order a list according to an arbitrary order and I would like to be able to basically make items share a row/slot.
Basically, as image, if that helps explain it. So that I can reorder the entire list and have them share the same block if I want to.
Thanks!
All reactions