rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

Sortable with KO 3.3 Template Engine lodash #149

Closed tugas closed 9 years ago

tugas commented 9 years ago

Hello, great job on this plugin, i have ran into a issue with duplicated entries on drag-sorting. I'm using loadsh as my template engine and i think this is the problem here is an example that is similar of what i'm doing base on your examples sample in fiddle, when dragging between the boxes some times values become duplicated even within the same box.

Any ideias? Thanks

tugas commented 9 years ago

This is bad i know replying to my own question but i found out the problem. precompiled = _.template("{{ with($data) { }} " + templateSource.text() + " {{ } }}"); should be used without spaces like this precompiled = _.template("{{with($data){}}" + templateSource.text() + "{{}}}");

I hope at least this helps others. Thanks.

rniemeyer commented 9 years ago

@tugas - thanks! will surely leave this in case others run into the problem.