Skip to content

Commit

Permalink
Update src/knockout-sortable.js
Browse files Browse the repository at this point in the history
Allow items to be sorted in nested data structures.
  • Loading branch information
lisandropuzzolo committed Nov 2, 2012
1 parent ee494bb commit 14bcd8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/knockout-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

dragItem = null;

if (this === ui.item.parent()[0] && item) {
if ( ( $(this).has(ui.item.parent()) || this === ui.item.parent()[0] ) && item) { // this allows to sort items in nested data structures
//identify parents
sourceParent = ko.utils.domData.get(el, PARENTKEY);
targetParent = ko.utils.domData.get(el.parentNode, LISTKEY);
Expand Down

0 comments on commit 14bcd8e

Please sign in to comment.