I'm creating two CdkDropList objects and the dragging and dropping functionalities are working fine, my problem is that I would like to disable the sorting while I'm dragging in the first list. Let's say I have List A and List B. I'm dragging from A to B, I would like to disable the sorting while I'm over List A. In other words, I just want the drag n drop functionality, not the sorting. Can I disable that?
It's implemented now in the drag & drop module of Angular Material 8 > see Disabled sorting
I can do it simply adding a css property to the draggable div. I don't know that is the best solution, but, this work for me:
html:
<div cdkDropList>
<div class="item-draggable" *ngFor="let item of items" cdkDrag>
<span>{{item.label}}</span>
</div>
</div>
css:
.item-draggable {
transform: none !important;
}
UPDATE 10/28/2020
Angular material implemnt this with @Input sortingDisabled -> https://material.angular.io/cdk/drag-drop/api
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With