I'm trying to find out, if it's possible using CDK's Drag&Drop to not change position of any element form the list(during dragging) until it's dropped. Right now elements change their position when any element is dragged.
I'm trying to find out, if it's possible using CDK's Drag&Drop to not change position of any element form the list(during dragging) until it's dropped. Right now elements change their position when any element is dragged.
You can use the cdkDropListSortingDisabled directive.
<div
cdkDropList
[cdkDropListData]="items"
class="example-list"
cdkDropListSortingDisabled
(cdkDropListDropped)="drop($event)">
<div class="example-box" *ngFor="let item of items" cdkDrag>{{item}}</div>
</div>
For further examples see cdk drag and drop examples