bevacqua / react-dragula

:ok_hand: Drag and drop so simple it hurts

Home Page:http://bevacqua.github.io/react-dragula

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Accepts callback

sajumani opened this issue · comments

Hi,

I need to create Action once drop completed... but accept callback fires ,when move starts and passing multiple unwanted updates to server

let options = {

      accepts: function (el, target, source, sibling) {
        console.log(el, source, target, sibling); // This fires when moving 
        return true; 
      }

  };

Mr.Bevacqua ???

Any Idea ???

@sajumani you should look into the drop event.

(this is using ES2015)

Dragula([...])
    .on('drop', (el, target, source, sibling) => {
       // Create Action here
    });