SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

Dragged Item disappear when moved to empty Column #241

Closed Gabrielr47 closed 1 year ago

Gabrielr47 commented 1 year ago

I have a Kanban board which is a combination of nested vuedraggable with Columns as Brands, and Swimlanes as Status, "Open", "Close" and "Pending", When I drag an Item in the Pending column to an empty column it dissapears but draging the items in the same column doesn't and moving to other swimlanes and back works.

demo

Repository link

https://github.com/Gabrielr47/kanban-board

Demo link

https://gabrielr47.github.io/kanban-board/

Step by step scenario

Move a item to an empty pending column

Actual Solution

The item is disappearing

Expected Solution

The item should stay visible

Gabrielr47 commented 1 year ago

I managed to solve the issue, what happens is that some columns don't have the correspondent data, so when I tried to move an item to an column that don't exist it fails, adding the data like this solved the issue:

  {
    "swimlane": {
      "field": "sys_status",
      "key": 692,
      "label": "Pending"
    },
    "column": {
      "field": "brand",
      "key": 111,
      "label": "Argon Audio"
    },
    "tot_count": 0,
    "entries": []
  },