• Overview
@angular/cdk/drag-drop

CdkDragSortEvent

interface

Event emitted when the user swaps the position of two drag items.

API

  interface CdkDragSortEvent<T = any, I = T> { previousIndex: number; currentIndex: number; container: CdkDropList<T>; item: CdkDrag<I>;}  

previousIndex

number

Index from which the item was sorted previously.

currentIndex

number

Index that the item is currently in.

container

CdkDropList<T>

Container that the item belongs to.

item

CdkDrag<I>

Item that is being sorted.

Jump to details