ng-sortable: Not working when as-sortable-item-handle inside directive with isolated scope
I ma using the ng-sortable as follows
<section as-sortable ng-model='somedata'>
<div ng-repeat>
<div class='a'><div>
<div class='b' as-sortable-item>
<some-directive-with-isolated-scope as-sortable-item-handler>
</div>
</div>
</section>'
and I receive the following error on line 654 Uncaught TypeError: Cannot read property ‘options’ of undefined
//the row
// (optional) Scrollable container as reference for top & left offset calculations, defaults to Document
scrollableContainer = angular.element($document[0].querySelector(scope.sortableScope.options.scrollableContainer)).length > 0 ?
$document[0].querySelector(scope.sortableScope.options.scrollableContainer) : $document[0].documentElement;
the problem is that the sortableScope is inside the scope. itemScope
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 34 (8 by maintainers)
Commits related to this issue
- Fix for issue #93 — committed to a5hik/ng-sortable by a5hik 9 years ago
- Fixes issue #93; Using right scope for item when handle is in isolated scope — committed to johankvint/ng-sortable by johankvint 8 years ago
- Merge pull request #324 from cybercomkvint/handle_isolated_fix Fixes issue #93 — committed to a5hik/ng-sortable by a5hik 8 years ago
I just updated to latest version 1.3.8 and am still getting this error:
Any chance the merged fix can get incorporated in a new release?
I’ll be working on that component again this quarter. So we’ll see.
For info, I managed to fix the
item.index is not a function
error with this patchI’m also having issue similar to this:
And then I’m using
data-as-sortable-item
anddata-as-sortable-item-handle
inside custom directive template.The error I’m getting when dragging: