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

Open
karazyabko opened this issue Nov 7, 2019 · 0 comments
Labels

Comments

@karazyabko
Copy link

@karazyabko 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 label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.