{"action":"opened","issue":{"url":"https://api.github.com/repos/Jexordexan/vue-slicksort/issues/18","repository_url":"https://api.github.com/repos/Jexordexan/vue-slicksort","labels_url":"https://api.github.com/repos/Jexordexan/vue-slicksort/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Jexordexan/vue-slicksort/issues/18/comments","events_url":"https://api.github.com/repos/Jexordexan/vue-slicksort/issues/18/events","html_url":"https://github.com/Jexordexan/vue-slicksort/issues/18","id":310362056,"number":18,"title":"Define sortable container explicitly","user":{"login":"atilkan","id":1254613,"avatar_url":"https://avatars0.githubusercontent.com/u/1254613?v=4","gravatar_id":"","url":"https://api.github.com/users/atilkan","html_url":"https://github.com/atilkan","followers_url":"https://api.github.com/users/atilkan/followers","following_url":"https://api.github.com/users/atilkan/following{/other_user}","gists_url":"https://api.github.com/users/atilkan/gists{/gist_id}","starred_url":"https://api.github.com/users/atilkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilkan/subscriptions","organizations_url":"https://api.github.com/users/atilkan/orgs","repos_url":"https://api.github.com/users/atilkan/repos","events_url":"https://api.github.com/users/atilkan/events{/privacy}","received_events_url":"https://api.github.com/users/atilkan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-01T23:20:40Z","updated_at":"2018-04-01T23:20:40Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI have a problem while sorting. Dragged element disappears from view. It is inserted just before closing body tag. Is there a way to manage sortable container?\r\n\r\nMy example here:\r\n**in html**\r\n```\r\n<sortable-list v-model=\"skillList\" v-bind:use-drag-handle=\"true\">\r\n\t\t\t<sortable-item v-for=\"(item, index) in skillList\" v-bind:index=\"index\" v-bind:key=\"index\" v-bind:item=\"item\" />\r\n\t\t</sortable-list>\r\n```\r\n\r\n**in js, sortable list**\r\n\r\n```\r\nconst SortableList = {\r\n\t\tmixins: [ContainerMixin],\r\n\t\ttemplate: `\r\n\t\t<div class=\"root\">\r\n\t\t<div id=\"dragableArea\">\r\n\t\t\t<slot />\r\n\t\t </div>\r\n\t\t</div>\r\n\t\t`,\r\n\t}\r\n```\r\n\r\n**in js, sortable-item**\r\n\r\nconst SortableItem = {\r\n\t\tmixins: [ElementMixin],\r\n\t\tprops: [\"item\", \"useHandle\"],\r\n\t\tdirectives: { handle: HandleDirective },\r\n\t\tmethods: {\r\n\t\t\tstarItem: function (event) {\r\n\t\t\t\tconst index = Array.from(event.target.parentElement.children).indexOf(event.target)\r\n\t\t\t\tconsole.log(\"index:\", index);\r\n\t\t\t},\r\n\t\t\taddToList: function (id) {\r\n\t\t\t\tconsole.log(\"add to list\", id);\r\n\r\n\t\t\t},\r\n\t\t\tdeleteFromItem: function (event) {\r\n\t\t\t\tlet id = event.currentTarget.parentElement.dataset.id\r\n\t\t\t\tconst index = Array.from(event.currentTarget.parentElement.parentElement.children).indexOf(event.target)\r\n\t\t\t\tconsole.log(\"delete from list\", id);\r\n\t\t\t},\r\n\t\t},\r\ntemplate: `<li>some staff</li>`\r\n}"}}
{"actor":{"display_login":"atilkan"}}