You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use ng-sortable inside a directive that is using ng-sortable like:
directive1:
ng-sortable
ng-repeat(list1)
directive2
directive2
ng-sortable
ng-repeat(list2)
directive1 is working fine, the list is ordered as expected, but on directive2 when trying to order (dragging/dropping) its changing the order going back to the original position. If I remove the ng-sortable config on directive1 the directive2 start working.
I've got nested sorting to work I was using nested components, try making your directives have isolated scope, failing that you prob could pass a conf object to ng-sortable and declare a group see here for options and the readme for examples
+1... Running into this issue as well. Any solutions yet? The child sortable is taking the parent sortable's index value which is breaking functionality.
Activity
Akta3d commentedon Aug 11, 2016
I have approximatively same problem when use ng-sortable inside a directive who alreay use ng-sortable.
I haven't problem with directive 2 (drag/drop work well inside directive 2), but I have problem when I try to put item of list2 in list1
I have make plunker in issue #8 and #9
I try to fix this problem with no success
samjacobclift commentedon Sep 13, 2016
I've got nested sorting to work I was using nested components, try making your directives have isolated scope, failing that you prob could pass a conf object to
ng-sortableand declare agroupsee here for options and the readme for examplessamuelcastro commentedon Nov 16, 2016
@royka either using isolated scope or
groupit's not working. :(The only detail that I'm not sure could make or not any difference here is that I'm requiring
ngModelin my directive:require: 'ngModel'samjacobclift commentedon Nov 16, 2016
ngModelshouldn't make a difference I think, perhaps try wrapping the ngmodel directive in some htmladidas-jordan commentedon Dec 8, 2016
+1... Running into this issue as well. Any solutions yet? The child sortable is taking the parent sortable's index value which is breaking functionality.
samuelcastro commentedon Apr 20, 2017
@samjacobclift Still getting this issue, any idea?
samjacobclift commentedon Dec 14, 2017
I think this might be to do with the version of sortable JS being used, what versions are you guys using?