{"action":"created","issue":{"url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/506","repository_url":"https://api.github.com/repos/valor-software/ng2-dragula","labels_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/506/comments","events_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/506/events","html_url":"https://github.com/valor-software/ng2-dragula/issues/506","id":199219931,"number":506,"title":"[dragulaModel] error with drake.models.","user":{"login":"AlekseyChuyan","id":12247307,"avatar_url":"https://avatars.githubusercontent.com/u/12247307?v=3","gravatar_id":"","url":"https://api.github.com/users/AlekseyChuyan","html_url":"https://github.com/AlekseyChuyan","followers_url":"https://api.github.com/users/AlekseyChuyan/followers","following_url":"https://api.github.com/users/AlekseyChuyan/following{/other_user}","gists_url":"https://api.github.com/users/AlekseyChuyan/gists{/gist_id}","starred_url":"https://api.github.com/users/AlekseyChuyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlekseyChuyan/subscriptions","organizations_url":"https://api.github.com/users/AlekseyChuyan/orgs","repos_url":"https://api.github.com/users/AlekseyChuyan/repos","events_url":"https://api.github.com/users/AlekseyChuyan/events{/privacy}","received_events_url":"https://api.github.com/users/AlekseyChuyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-06T15:31:45Z","updated_at":"2017-01-10T17:58:14Z","closed_at":null,"body":"I have find strange bug. I have calendar with 42 days. Each day have it's own events list. And I have list of unplanned events with same object model. Here is a part of my template:\r\n \r\ndiv class=\"container day-events\" [dragula]='\"another-bag\"' [dragulaModel]='day.events'\r\n  div class=\"draft\" *ngFor=\"let draft of day?.events\"\r\n    div class=\"btn-group\"\r\n      a (click)=\"$event.stopPropagation()\"\r\n         img src=\"images/i-edit.png\"\r\n      /a\r\n      a (click)=\"cancelScheduledPost($event, draft)\"\r\n        img src=\"images/i-trash.png\"\r\n      /a\r\n    /div\r\n    img src=\"{{draft?.src}}\">\r\n    div class=\"draft-info\".....\r\n\r\n\r\ndiv *ngIf=\"!filterView\" class='container drafts-list' [dragula]='\"another-bag\"' [dragulaModel]='draftsArray' [ngClass]=\"{'grid': grid}\"\r\n  div class=\"draft\" *ngFor=\"let draft of draftsArray\"\r\n    div class=\"btn-group\"\r\n      a (click)=\"$event.stopPropagation()\"\r\n        img src=\"images/i-edit.png\"\r\n      /a\r\n      a (click)=\"cancelScheduledPost($event, draft)\"\r\n        img src=\"images/i-trash.png\"\r\n      /a\r\n    /div\r\n    img src=\"{{draft?.src}}\"\r\n    div class=\"draft-info\".....\r\n\r\nSo when I drag and drop some event I have errors: \r\nEXCEPTION: Cannot read property '0' of undefined\r\nEXCEPTION: Cannot read property 'splice' of undefined.\r\n\r\nAfter some research i found that in dragula.provider.js at 81 line\r\nsourceModel = drake.models[drake.containers.indexOf(source)];\r\nThere is wrong number of drake.models [] elements. There are no element for my last calendar day. Thats why I allwayse have sourceModel = undefined.\r\n"},"comment":{"url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/comments/271648679","html_url":"https://github.com/valor-software/ng2-dragula/issues/506#issuecomment-271648679","issue_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/506","id":271648679,"user":{"login":"LuisUrrutia","id":3771248,"avatar_url":"https://avatars.githubusercontent.com/u/3771248?v=3","gravatar_id":"","url":"https://api.github.com/users/LuisUrrutia","html_url":"https://github.com/LuisUrrutia","followers_url":"https://api.github.com/users/LuisUrrutia/followers","following_url":"https://api.github.com/users/LuisUrrutia/following{/other_user}","gists_url":"https://api.github.com/users/LuisUrrutia/gists{/gist_id}","starred_url":"https://api.github.com/users/LuisUrrutia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuisUrrutia/subscriptions","organizations_url":"https://api.github.com/users/LuisUrrutia/orgs","repos_url":"https://api.github.com/users/LuisUrrutia/repos","events_url":"https://api.github.com/users/LuisUrrutia/events{/privacy}","received_events_url":"https://api.github.com/users/LuisUrrutia/received_events","type":"User","site_admin":false},"created_at":"2017-01-10T17:58:14Z","updated_at":"2017-01-10T17:58:14Z","body":"I have the same problem"}}
{"actor":{"display_login":"LuisUrrutia"}}