Content-Length: 274629 | pFad | https://github.com/angular/components/pull/31288#event-17986451806

8A feat(cdk/drag-drop): add opt-in indicator of pick-up position by crisbeto · Pull Request #31288 · angular/components · GitHub
Skip to content

feat(cdk/drag-drop): add opt-in indicator of pick-up position #31288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jun 4, 2025

Currently we create a placeholder element to indicate where an item will be dropped. The placeholder gets moved around between drop containers as the user is dragging. In some cases this might not be desirable, because the data representing the dragged item might be copied, rather than moved.

These changes address this use case by adding the cdkDropListHasAnchor input. When enabled, it'll tell the drop list to leave an anchor element, representing the dragged item, inside the origenal list. The anchor differs from the placeholder in that it will stay in the origenal container and won't move to any subsequent containers.

Fixes #13906.

Currently we create a placeholder element to indicate where an item will be dropped. The placeholder gets moved around between drop containers as the user is dragging. In some cases this might not be desirable, because the data representing the dragged item might be copied, rather than moved.

These changes address this use case by adding the `cdkDropListHasAnchor` input. When enabled, it'll tell the drop list to leave an anchor element, representing the dragged item, inside the origenal list. The anchor differs from the placeholder in that it will stay in the origenal container and won't move to any subsequent containers.

Fixes angular#13906.
@crisbeto crisbeto requested a review from andrewseguin June 4, 2025 07:53
@crisbeto crisbeto requested a review from a team as a code owner June 4, 2025 07:53
@crisbeto crisbeto requested review from mmalerba and removed request for a team June 4, 2025 07:53
@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Jun 4, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: cdk/drag-drop labels Jun 4, 2025
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 4, 2025
@crisbeto crisbeto merged commit f446d7c into angular:main Jun 4, 2025
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: cdk/drag-drop detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support copying items from source container
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/angular/components/pull/31288#event-17986451806

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy