Move cards between two Kanban boards

Hello,
I have two Kanban boards und want to move a card from one board to another. Simple DnD don’t working.
I get following errors:

Incorrect ID in DataMove::move
DataStore::getIdByIndex Incorrect index
Uncaught TypeError: Cannot read property ‘id’ of undefined

Anyone an idea?

Thanks in advance

I tried following solution.
I added an EventListener for “onListBeforeDrop” event.


onListBeforeDrop(context, ev, list) {
const item = $$(context.from.config.id).getItem(context.start);
$$(context.from.config.id).remove(item.id);
$$(context.to.config.id).add(item);
}

It works, but finally I get following errors:


webix.js:362 Invalid ID for updateItem
webix.js:9114 Uncaught TypeError: Cannot read property ‘id’ of undefined
at DataStore.updateItem (webix.js:9114)
at result.updateItem (webix.js:9648)
at result._applyOrder (kanban.js:1199)
at DataStore. (kanban.js:951)
at DataStore.callEvent (webix.js:691)
at DataStore.updateItem (webix.js:9121)
at result.updateItem (webix.js:9648)
at result.move (kanban.js:271)
at result.move (webix.js:8271)
at result.move (kanban.js:255)

Any idea whats wrong?

Hello @vsinner ,

I have two Kanban boards und want to move a card from one board to another. Simple DnD don’t working.
As far I can see, it work fine:
Code Snippet

I added an EventListener for “onListBeforeDrop” event.

In this case, returning false within the drop handler (onListBeforeDrop) of the inner kanbanlist will prevent the error:
https://snippet.webix.com/e9n5mf67

Thank you for help!
That was very helpful.

I found a similar solution here:
https://forum.webix.com/discussion/37632/kanban-drag-from-column-and-drop-to-an-external-list-view#latest

Code Snippet:
https://snippet.webix.com/vrgrzxzk