feat(drag-drop): add option for items to be returned to original list if not dropped on container
Open
Nobody has claimed this yet.
area: cdk/drag-drop
feature
P4
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
Steps to reproduce:
- Have 2 drop containers.
- Drag item from one container.
- Move over the items of the other container
- Move outside any container.
- Release button.
Expected Behavior
The item should transform to initial container and initial position.
Actual Behavior
The item transforms to the position of the last hovered item of the last entered container.
Environment
- Angular: 9.0.2
- CDK/Material: 9.1.0
- Browser(s): Google Chrome Version 80.0.3987.116
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Pro
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the drag scenario with two drop containers described in the issue, then inspect the Angular CDK drag-drop API and behavior around leaving a container. Done means a configurable option restores the item to its original container and position when released outside any container, without changing existing behavior by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100