ember-examples-jquery-sortable
ember-examples-jquery-sortable copied to clipboard
This approach won't work with Ember.js 1.8
FYI, for those that may find this post...this approach doesn't work perfectly with Ember 1.8 and jQuery...when jQuery modifies the DOM, it messes with Ember's knowledge of what it thinks the DOM is and should be.
In the simple case, using a CollectionView instead of {{#each}} will work.
@lepoltj Do you have an example using CollectionView for 1.8?
Nevermind I figured it out, thanks for the tip @lepoltj
Here is an example using Collection View, someone asked for but the comment has been deleted since
http://emberjs.jsbin.com/qehiqu/3/edit
I've asked, but I managed to refactor this to CollectionView according to your answer(thanks!). But when I update item order, updates to DOM aren't smooth. I guess whole view is being re-rendered. Have you got any solution to this issue? @DEfusion
@Kuzirashi I've experienced the same thing, it depends on how complex your item view/template is or how many items you have in your collection. I tried some of the different events that jquery sortable provides to see if that would smooth things out but didn't find a solution.