Skip to content

CdkDragDrop.previousIndex is never being updated #18482

Closed
@jeanbza

Description

@jeanbza

It looks like CdkDragDrop.previousIndex is never being updated. It always reports the original index - rather than the previous - of the thing being dragged.

Reproduction

#18456 reproduces this issue.

Expected Behavior

CdkDragDrop.previousIndex has the "before this drag" index value of the thing I'm dragging, rather than the "before any drags occurred" index value of the thing I'm dragging.

Actual Behavior

CdkDragDrop.previousIndex has the "before any drags occurred" index value of the thing I'm dragging.

Environment

  • Angular: HEAD (dev)
  • CDK/Material: HEAD (dev)
  • Browser(s): chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): mac, linux

Metadata

Metadata

Assignees

Labels

GThis is is related to a Google internal issueP2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions