ng-nestable
ng-nestable copied to clipboard
Disabling dragging/sorting.
Hi!
How do it disable draggin/sorting? i couldn't find any info on that on the documentation.
Hi @meltedscripts
Maybe is too late but, for the entire list do this:
<div ng-nestable ng-model="items" ng-class="{'dd-nodrag': ctrl.noDragValue}"></div>
Cheers
Thanks!
@CristianMR Can u please give an example on how you disabled the drag functionality with code
@jpmohan1111 I'm sorry, but I have not a lot of spare time at the moment. But, ng-class would add dd-nodrag to the element classes if the value on ctrl.noDragValue is true. With that in mind, I searched inside the jQuery Nestable library and found a solution. Just follow noDragClass, which value is setted with dd-nodrag.
The handling of the drag is canceled because of the 'dd-nodrag' class on the element.
I think that's enough for you to understand why this works, it's not documented, that's all.
hello guys, when I add ng-class="{'dd-nodrag': ctrl.noDragValue}" it still not working for me