{"action":"created","issue":{"url":"https://api.github.com/repos/staskjs/vue-slick/issues/45","repository_url":"https://api.github.com/repos/staskjs/vue-slick","labels_url":"https://api.github.com/repos/staskjs/vue-slick/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/staskjs/vue-slick/issues/45/comments","events_url":"https://api.github.com/repos/staskjs/vue-slick/issues/45/events","html_url":"https://github.com/staskjs/vue-slick/issues/45","id":263726417,"number":45,"title":"problems with reSlick","user":{"login":"iwebnaut","id":443080,"avatar_url":"https://avatars3.githubusercontent.com/u/443080?v=4","gravatar_id":"","url":"https://api.github.com/users/iwebnaut","html_url":"https://github.com/iwebnaut","followers_url":"https://api.github.com/users/iwebnaut/followers","following_url":"https://api.github.com/users/iwebnaut/following{/other_user}","gists_url":"https://api.github.com/users/iwebnaut/gists{/gist_id}","starred_url":"https://api.github.com/users/iwebnaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwebnaut/subscriptions","organizations_url":"https://api.github.com/users/iwebnaut/orgs","repos_url":"https://api.github.com/users/iwebnaut/repos","events_url":"https://api.github.com/users/iwebnaut/events{/privacy}","received_events_url":"https://api.github.com/users/iwebnaut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-08T15:35:08Z","updated_at":"2017-12-05T18:21:12Z","closed_at":null,"author_association":"NONE","body":"I am using v-for loop to render slides and when I add new slide I run reSlick\r\n\r\n    this.$refs.slick.reSlick()\r\n\r\nit works fine on static content with no v-for, for example this works:\r\n\r\n            <slick ref=\"slick\" :options=\"slickOptions\">\r\n                <div class=\"slide\">\r\n                    <img src=\"/uploads/2017/10/5/lamborghini-aventador-zaragoza-wide-1_large.jpg\" alt=\"\" class=\"img-responsive\" style=\"width: 100%;\">\r\n                </div>\r\n                <div class=\"slide\">\r\n                    <img src=\"/uploads/2017/10/5/lamborghini-aventador-zaragoza-wide-1_large.jpg\" alt=\"\" class=\"img-responsive\" style=\"width: 100%;\">\r\n                </div>\r\n            </slick>\r\n\r\nI run reSlick on that and it does not mess up the slides, however if I have a v-for where I can dinamically insert slides then I get a problem\r\n\r\nexample:\r\n\r\ntemplate:\r\n\r\n            <slick ref=\"slick\" :options=\"slickOptions\">\r\n                <component v-for=\"slide in slides\"\r\n                  v-bind:is=\"slide.type\"\r\n                  :uniqueId=\"slide.uniqueId\"\r\n                  v-bind=\"slide.settings\"\r\n                  v-on:remove=\"removeBlock(slide.uniqueId)\"\r\n                  :key=\"slide.uniqueId\">\r\n                </component>\r\n            </slick>\r\n\r\n\r\nwatch:\r\n\r\n        watch: {\r\n            slides(val) {\r\n                this.reInit()\r\n            }\r\n\r\n\r\nAs soon as I add second slide manually throught user interface of my app, the html code that is output should be two slides, it should output only slide component template:\r\n\r\n    <div class=\"slide\">\r\n        {{uniqueId}}\r\n        <img style=\"width: 100%;\" class=\"img-responsive\" src=\"/uploads/2017/10/5/lamborghini-aventador-zaragoza-wide-1_large.jpg\" alt=\"\">\r\n    </div>\r\n\r\nhowever after reSlick is run, it \"swallows\" all html code but of the last slide added. So I can't reinitialize slides after i add new slide, all old slides get removed from html and latest one is inserted.\r\nThis does not happen if reSlick is not run after I manually add a slide.\r\n"},"comment":{"url":"https://api.github.com/repos/staskjs/vue-slick/issues/comments/349394291","html_url":"https://github.com/staskjs/vue-slick/issues/45#issuecomment-349394291","issue_url":"https://api.github.com/repos/staskjs/vue-slick/issues/45","id":349394291,"user":{"login":"iwebnaut","id":443080,"avatar_url":"https://avatars3.githubusercontent.com/u/443080?v=4","gravatar_id":"","url":"https://api.github.com/users/iwebnaut","html_url":"https://github.com/iwebnaut","followers_url":"https://api.github.com/users/iwebnaut/followers","following_url":"https://api.github.com/users/iwebnaut/following{/other_user}","gists_url":"https://api.github.com/users/iwebnaut/gists{/gist_id}","starred_url":"https://api.github.com/users/iwebnaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwebnaut/subscriptions","organizations_url":"https://api.github.com/users/iwebnaut/orgs","repos_url":"https://api.github.com/users/iwebnaut/repos","events_url":"https://api.github.com/users/iwebnaut/events{/privacy}","received_events_url":"https://api.github.com/users/iwebnaut/received_events","type":"User","site_admin":false},"created_at":"2017-12-05T18:21:12Z","updated_at":"2017-12-05T18:21:12Z","author_association":"NONE","body":"yes i have fixed my problem and got it working."}}
{"actor":{"display_login":"iwebnaut"}}