vue-sortable icon indicating copy to clipboard operation
vue-sortable copied to clipboard

Multiple lists

Open minedun6 opened this issue 8 years ago • 4 comments

Is it possible to use multiple lists, I need to do something like what Trello provides, I'm building a Kanban board and I need to move items between lists.

minedun6 avatar Nov 24 '16 19:11 minedun6

I would love to see that, and can help testing

mygnu avatar Dec 12 '16 00:12 mygnu

U can here's my email if you want [email protected]

minedun6 avatar Dec 12 '16 00:12 minedun6

I managed to get it working with this:

<ul v-sortable="{ group: { name: 'list-a', put: ['list-a', 'list-b'] } }"> <li class="list-group-item>One</li> <li class="list-group-item>Two</li> <li class="list-group-item>Three</li> </ul>

<ul v-sortable="{ group: { name: 'list-b', put: ['list-a', 'list-b'] } }"> <li class="list-group-item>Four</li> <li class="list-group-item>Five</li> <li class="list-group-item>Six</li> </ul>

tarpey avatar Mar 07 '17 00:03 tarpey

According to the SortableJS group option documentation, the generic way to set this up is to give your lists the same group name and set pull and put to true.

<ul v-sortable="{ group: { name: 'list', pull: true, put: true } }">
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
</ul>

<ul v-sortable="{ group: { name: 'list', pull: true, put: true } }">
    <li>Four</li>
    <li>Five</li>
    <li>Six</li>
</ul>

benjaminwy avatar Apr 08 '20 04:04 benjaminwy