glidejs / glide

A dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more
https://glidejs.com
MIT License
7.21k stars 768 forks source link

Issue with using glidejs and knockout #647

Open matthew-g-austin opened 1 year ago

matthew-g-austin commented 1 year ago

I'm using a knockout foreach to put in elements into the carousel. I'm thinking that glide.js is trying to remove my child nodes that are added after knockout has already removed them. `

          <li class="glide__slide" data-bind="attr: {id: 'glide-slide-' + $index()">
            <camera-streamer params="canvasClass: 'primary', canvasIndex: $index, canvasInfo: canvasInfo" data-bind="width: canvasWidth() + 'px', height: canvasHeight() + 'px' " ></camera-streamer>
            <!-- <camera-streamer style="height: 1500px; width: 1500px" params="canvasClass: 'secondary', canvasIndex: $index, canvasInfo: canvasInfo"></camera-streamer><-->
           </li> 
           <!-- /ko -->
        <!-- /ko -->`

This could be fixed by adding the suggested change here: ` /**

Please let me know if there is another workaround that I'm unaware of.