{"action":"created","issue":{"url":"https://api.github.com/repos/bevacqua/react-dragula/issues/14","repository_url":"https://api.github.com/repos/bevacqua/react-dragula","labels_url":"https://api.github.com/repos/bevacqua/react-dragula/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/bevacqua/react-dragula/issues/14/comments","events_url":"https://api.github.com/repos/bevacqua/react-dragula/issues/14/events","html_url":"https://github.com/bevacqua/react-dragula/issues/14","id":158074079,"number":14,"title":"obtain reference to react component on clone","user":{"login":"cristian-dan","id":13090691,"avatar_url":"https://avatars.githubusercontent.com/u/13090691?v=3","gravatar_id":"","url":"https://api.github.com/users/cristian-dan","html_url":"https://github.com/cristian-dan","followers_url":"https://api.github.com/users/cristian-dan/followers","following_url":"https://api.github.com/users/cristian-dan/following{/other_user}","gists_url":"https://api.github.com/users/cristian-dan/gists{/gist_id}","starred_url":"https://api.github.com/users/cristian-dan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristian-dan/subscriptions","organizations_url":"https://api.github.com/users/cristian-dan/orgs","repos_url":"https://api.github.com/users/cristian-dan/repos","events_url":"https://api.github.com/users/cristian-dan/events{/privacy}","received_events_url":"https://api.github.com/users/cristian-dan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-02T07:15:36Z","updated_at":"2016-09-22T18:14:20Z","closed_at":null,"body":"```\r\ndragula([container1,container2], {\r\n        direction: 'horizontal',\r\n        copy: function(el, source) {\r\n            return source === container1\r\n        },\r\n        accepts: function(el, target) {\r\n            return target !== container1\r\n        },\r\n        removeOnSpill: true\r\n      }).on('cloned', function(clonedElement,clonedFrom) {\r\n        reactComp = // how do i get the react component from clonedFrom dom?, can 'cloned' event return the react component too?\r\n      });\r\n```\r\n\r\nhow do i get the react component from clonedFrom dom node?, can 'cloned' event  return the react component too?\r\nthanks"},"comment":{"url":"https://api.github.com/repos/bevacqua/react-dragula/issues/comments/248983456","html_url":"https://github.com/bevacqua/react-dragula/issues/14#issuecomment-248983456","issue_url":"https://api.github.com/repos/bevacqua/react-dragula/issues/14","id":248983456,"user":{"login":"Nolski","id":2600677,"avatar_url":"https://avatars.githubusercontent.com/u/2600677?v=3","gravatar_id":"","url":"https://api.github.com/users/Nolski","html_url":"https://github.com/Nolski","followers_url":"https://api.github.com/users/Nolski/followers","following_url":"https://api.github.com/users/Nolski/following{/other_user}","gists_url":"https://api.github.com/users/Nolski/gists{/gist_id}","starred_url":"https://api.github.com/users/Nolski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nolski/subscriptions","organizations_url":"https://api.github.com/users/Nolski/orgs","repos_url":"https://api.github.com/users/Nolski/repos","events_url":"https://api.github.com/users/Nolski/events{/privacy}","received_events_url":"https://api.github.com/users/Nolski/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T18:14:20Z","updated_at":"2016-09-22T18:14:20Z","body":"I stored a key in the element that's dragable.\r\n\r\n```html\r\n<div ref=\"items>\r\n    <div class=\"draggable-item\" data-key=\"{key}\">...</div>\r\n    ...\r\n</div>\r\n```\r\n\r\nand then in javascript\r\n```javascript\r\n        Dragula([this.refs.items])\r\n            .on('drop', (el, target, source, sibling) => {\r\n                let key = $(el).data('key') // This is using jquery.\r\n                // this is the corresponding react object being dropped\r\n                let item = this.state.items.find((item) => { item.key === key }); \r\n            });\r\n```"}}
{"actor":{"display_login":"Nolski"}}