angular / angular/components

[dragDrop] On strict movement when dropping outside cdkDropList

Open
#17,351 10 comments 28 reactions 0 assignees View on GitHub
area: cdk/drag-drop feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Feature Description

There is one problem with this, because of some action after dragging on cdkDragDrop.

1. Drag the item.
2. Go through the drop zone.
3. Drop outside the drop zone.

In the case of dragDrop in angular / cdk, when dropping outside the drop zone, the item moves to the last drop zone where the item was entered.

![cdk](https://user-images.githubusercontent.com/4124275/66533466-f19b3280-eb4d-11e9-8b2d-ab99a3024761.gif)

In the dragula, apart from entering the drop zone, it returns to its original state when dropped outside the drop zone.

![dragula](https://user-images.githubusercontent.com/4124275/66533465-f1029c00-eb4d-11e9-9c01-f486d3d53e5b.gif)

Therefore, it would be nice to provide an strict method of returning to angular / cdk dragdrop as an option.

Please let me know if there is a way around this.

thank you

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported drag sequence with Angular CDK drag-and-drop: enter a cdkDropList, then drop outside it. Compare the result with the expected return to the original position and review the existing drag-drop behavior and discussion for an agreed API. Done means the strict behavior is available as an option and is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.