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

Comments

  • 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:
    https://snippet.webix.com/xfq386sg

    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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!