Closed DegreeDev closed 9 years ago
@DegreeDev - Extra text nodes around named templates have caused many problems in the sortable functionality. I still want to find a good solution to this that does not require the plugin to insert a new template engine.
So, try doing:
<script type="text/html" id="sample-item-template"><li class="ui-state-default">
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
<!-- ko text: name --><!-- /ko -->
</li></script>
The latest version (0.9.0) helps strip leading/trailing whitespace from named templates to alleviate this type of issue. Thanks!
I've noticed in v0.8.8 the "data-bind : sortable : { data: items, template: 'sample-template' }" is, upon drag complete, not removing the old item.
I've made a fiddle demonstrating it. There are two lists, one using the template binding, one using the anonymous templates. The template binding, does not work properly, while the anonymous template does.
http://jsfiddle.net/thftq3a3/
I've included the source of v0.8.8.
Upon further research, it appears the line below was removed. (Line 209 in v0.8.7 and removed in v0.8.8)
Adding this back in resolves the issue.
Thanks, Matt