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

feat(cdk/drag-drop): custom drag clone target #20537

Closed
wants to merge 1 commit into from
Closed

feat(cdk/drag-drop): custom drag clone target #20537

wants to merge 1 commit into from

Conversation

geometricpanda
Copy link

@geometricpanda geometricpanda commented Sep 10, 2020

By default the drag directive clones the element it's applied to and appends to
the end of body. This change allows for a selector, HTML element, or an ElementRef
to be provided for the clone to be appended to instead.

Closes #20536 #13288

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 10, 2020
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-drop.md Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-drop.md Show resolved Hide resolved
src/cdk/drag-drop/drag-drop.md Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-drop.md Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-ref.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-ref.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/drag-ref.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
src/cdk/drag-drop/directives/drag.ts Outdated Show resolved Hide resolved
@geometricpanda
Copy link
Author

@crisbeto hows this looking for you?

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there are some places that still refer to the parent value.

@geometricpanda
Copy link
Author

Looks good, but there are some places that still refer to the parent value.

Ah, the MD file!
Not sure why but there was a strange caching issue happening on my local machine - probably a dodgy webstorm plugin.

I've fixed that now, the only references to parent left in the code are completely unrelated to the PR.

Thank you for all your help on this btw

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the contribution!

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release labels Oct 1, 2020
@annieyw
Copy link
Contributor

annieyw commented Nov 3, 2020

@geometricpanda please rebase when possible

@geometricpanda
Copy link
Author

@annieyw couldnt rebase as i cant get to my dev laptop until after UK lockdown, had to use the github merge tools which created a merge commit, hope that's ok?

@wagnermaciel
Copy link
Contributor

@geometricpanda One of your commit messages is not correctly formatted. If possible, please reword the invalid commit message

By default the drag directive clones the element it's applied to and appends to
the end of body. This change allows for a selector, HTML element, or an ElementRef
to be provided for the clone to be appended to instead.

Closes #20536 #13288
@geometricpanda
Copy link
Author

geometricpanda commented Nov 25, 2020

@geometricpanda One of your commit messages is not correctly formatted. If possible, please reword the invalid commit message

@wagnermaciel

it was having an issue with the github merge commit, now i've finally got my dev laptop back i've been able to rebase so fingers crossed it should be ok now?

@AlecDusheck
Copy link

Any updates on this PR? It would be nice since I'm having styling issues

@geometricpanda
Copy link
Author

Any updates on this PR? It would be nice since I'm having styling issues

There's been some major changes been merged into the way the drag container is being handled in the CDK which means this mechanism is no longer going to work I fear :-(

@crisbeto
Copy link
Member

@geometricpanda I don't think anything fundamentally changed in the module, but there were definitely some changes that could've caused merge conflicts. Do you intend on reopening this or should I pick up the feature request?

@crisbeto
Copy link
Member

crisbeto commented Feb 7, 2021

I ended up re-implementing this myself in #21830. I also added support for parent which was omitted here.

@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 Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cdkDrag): Specify drag clone location
6 participants