Skip to content
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

CDK drag and drop: add ability to drag item in copy mode without changing initial list #17638

Closed
karazyabko opened this issue Nov 7, 2019 · 3 comments
Labels
area: cdk/drag-drop feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team

Comments

@karazyabko
Copy link

karazyabko commented Nov 7, 2019

Feature Description

Hi, guys. I would like to propose a small enhancement for copying items from list to list. Currently copying works great, but after item is dragged to another list, initial list removes it from itself and bind it to root element (body tag in my case). But way that I see more logical is to add boolean @input (let's name it cdkDropListCopyMode) to drop list directive to make it possible to choose conditionally whether you want to move items and leave default behavior or to copy items and avoid removing item from initial list.

Use Case

In my project I have list of items (initial list) and sublist constructor (destination list). Initial list is fluid, and if one item from this list is removed, items after this item seek to fill free place one by one, and after you release item it appears in initial list again, and this flickering looks odd.

P.S. I saw your comment in source code that you move the element out at the end of the body and make it hidden, because keeping it in place will throw off the consumer's :last-child selectors, but I believe that it shouldn't be a problem as well. Also I've been tracking #13100 until it was automatically closed, but this behavior is still not fixed. If you need help with it, just let me know.

@karazyabko karazyabko added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Nov 7, 2019
@maknapp
Copy link

maknapp commented Jan 10, 2020

This is a duplicate of #13906

@mmalerba mmalerba added the needs triage This issue needs to be triaged by the team label May 20, 2020
@jelbourn
Copy link
Member

Duplicate of #13906

@jelbourn jelbourn marked this as a duplicate of #13906 Jun 26, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/drag-drop feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

5 participants