Nested Drag and Drop in with Angular 7 Material CDK
I've got a nested tree (Not the tree component) of drag and drop lists.
When dragging items around in drop lists that are contained inside of another drop list - Enter / Exit events are firing for both drop lists, meaning that when an item is dropped it could either be dropped into the inner drop list or the container drop list depending where it was dropped (Note: These lists are all linked to each other)
I'm thinking at the moment that the best solution will to be suppress events firing for the container list if the drag is currently over an inner list but I'm not sure if this is the best solution or exactly how to do it at the moment.
angular drag-and-drop angular7 angular-cdk
add a comment |
I've got a nested tree (Not the tree component) of drag and drop lists.
When dragging items around in drop lists that are contained inside of another drop list - Enter / Exit events are firing for both drop lists, meaning that when an item is dropped it could either be dropped into the inner drop list or the container drop list depending where it was dropped (Note: These lists are all linked to each other)
I'm thinking at the moment that the best solution will to be suppress events firing for the container list if the drag is currently over an inner list but I'm not sure if this is the best solution or exactly how to do it at the moment.
angular drag-and-drop angular7 angular-cdk
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22
add a comment |
I've got a nested tree (Not the tree component) of drag and drop lists.
When dragging items around in drop lists that are contained inside of another drop list - Enter / Exit events are firing for both drop lists, meaning that when an item is dropped it could either be dropped into the inner drop list or the container drop list depending where it was dropped (Note: These lists are all linked to each other)
I'm thinking at the moment that the best solution will to be suppress events firing for the container list if the drag is currently over an inner list but I'm not sure if this is the best solution or exactly how to do it at the moment.
angular drag-and-drop angular7 angular-cdk
I've got a nested tree (Not the tree component) of drag and drop lists.
When dragging items around in drop lists that are contained inside of another drop list - Enter / Exit events are firing for both drop lists, meaning that when an item is dropped it could either be dropped into the inner drop list or the container drop list depending where it was dropped (Note: These lists are all linked to each other)
I'm thinking at the moment that the best solution will to be suppress events firing for the container list if the drag is currently over an inner list but I'm not sure if this is the best solution or exactly how to do it at the moment.
angular drag-and-drop angular7 angular-cdk
angular drag-and-drop angular7 angular-cdk
edited Nov 15 '18 at 23:41
Goncalo Peres
1,4541519
1,4541519
asked Nov 12 '18 at 23:57
anewtonleveyanewtonlevey
558
558
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22
add a comment |
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22
add a comment |
2 Answers
2
active
oldest
votes
The problem with this solution is that the predicate does not affect already ongoing drag within CdkDropList where the drag originated.
This is a problem because while moving objects 'up' the hierarchy works (because of the predicate function), moving, for example, one item under it's sibling, 'down' in hierarchy causes unavoidable overlap of 2 CdkDropLists areas which will result in race condition.
This is the main problem that needs solving - how to arbitrary tell parent CdkDropList to 'stop considering' the CdkDrag (reacting to the drag) while still being able to effectively drop it in the child CdkDropList
Or in other words - get all of CdkDropLists pierced by Z axis of X,Y marked by pointer position, choose one with the smallest area (the 'youngest') and make the rest 'non responsive' to current drag.
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
add a comment |
I did manage to find a solution to this, although it's definitely hacky and involves accessing a private value with the Angular drag and drop CDK.
I use the cdkDropListEnterPredicate function to check which list it should be trying to drop into, which i assign the canDropPredicate function.
I'm also forced to get access to the pointer position via: _pointerPositionAtLastDirectionChange which isn't great as not all the values I'd like to see passed into the cdkDropListEnterPredicate get passed.
canDropPredicate(): Function
const me = this;
return (drag: CdkDrag<ResourceNode>, drop: CdkDropList<ResourceNode>): boolean =>
const fromBounds = drag.dropContainer.element.nativeElement.getBoundingClientRect();
const toBounds = drop.element.nativeElement.getBoundingClientRect();
if (!me.intersect(fromBounds, toBounds))
return true;
// This gross but allows us to access a private field for now.
const pointerPosition: Point = drag['_dragRef']['_pointerPositionAtLastDirectionChange'];
// They Intersect with each other so we need to do some calculations here.
if (me.insideOf(fromBounds, toBounds))
return !me.pointInsideOf(pointerPosition, fromBounds);
if (me.insideOf(toBounds, fromBounds) && me.pointInsideOf(pointerPosition, toBounds))
return true;
return false;
;
intersect(r1: DOMRect | ClientRect, r2: DOMRect | ClientRect): boolean
r2.top > r1.bottom
insideOf(innerRect: DOMRect | ClientRect, outerRect: DOMRect | ClientRect): boolean
return innerRect.left >= outerRect.left &&
innerRect.right <= outerRect.right &&
innerRect.top >= outerRect.top &&
innerRect.bottom <= outerRect.bottom &&
!(
innerRect.left === outerRect.left &&
innerRect.right === outerRect.right &&
innerRect.top === outerRect.top &&
innerRect.bottom === outerRect.bottom
);
pointInsideOf(position: Point, rect: DOMRect | ClientRect)
return position.x >= rect.left &&
position.x <= rect.right &&
position.y >= rect.top &&
position.y <= rect.bottom;
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53271834%2fnested-drag-and-drop-in-with-angular-7-material-cdk%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem with this solution is that the predicate does not affect already ongoing drag within CdkDropList where the drag originated.
This is a problem because while moving objects 'up' the hierarchy works (because of the predicate function), moving, for example, one item under it's sibling, 'down' in hierarchy causes unavoidable overlap of 2 CdkDropLists areas which will result in race condition.
This is the main problem that needs solving - how to arbitrary tell parent CdkDropList to 'stop considering' the CdkDrag (reacting to the drag) while still being able to effectively drop it in the child CdkDropList
Or in other words - get all of CdkDropLists pierced by Z axis of X,Y marked by pointer position, choose one with the smallest area (the 'youngest') and make the rest 'non responsive' to current drag.
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
add a comment |
The problem with this solution is that the predicate does not affect already ongoing drag within CdkDropList where the drag originated.
This is a problem because while moving objects 'up' the hierarchy works (because of the predicate function), moving, for example, one item under it's sibling, 'down' in hierarchy causes unavoidable overlap of 2 CdkDropLists areas which will result in race condition.
This is the main problem that needs solving - how to arbitrary tell parent CdkDropList to 'stop considering' the CdkDrag (reacting to the drag) while still being able to effectively drop it in the child CdkDropList
Or in other words - get all of CdkDropLists pierced by Z axis of X,Y marked by pointer position, choose one with the smallest area (the 'youngest') and make the rest 'non responsive' to current drag.
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
add a comment |
The problem with this solution is that the predicate does not affect already ongoing drag within CdkDropList where the drag originated.
This is a problem because while moving objects 'up' the hierarchy works (because of the predicate function), moving, for example, one item under it's sibling, 'down' in hierarchy causes unavoidable overlap of 2 CdkDropLists areas which will result in race condition.
This is the main problem that needs solving - how to arbitrary tell parent CdkDropList to 'stop considering' the CdkDrag (reacting to the drag) while still being able to effectively drop it in the child CdkDropList
Or in other words - get all of CdkDropLists pierced by Z axis of X,Y marked by pointer position, choose one with the smallest area (the 'youngest') and make the rest 'non responsive' to current drag.
The problem with this solution is that the predicate does not affect already ongoing drag within CdkDropList where the drag originated.
This is a problem because while moving objects 'up' the hierarchy works (because of the predicate function), moving, for example, one item under it's sibling, 'down' in hierarchy causes unavoidable overlap of 2 CdkDropLists areas which will result in race condition.
This is the main problem that needs solving - how to arbitrary tell parent CdkDropList to 'stop considering' the CdkDrag (reacting to the drag) while still being able to effectively drop it in the child CdkDropList
Or in other words - get all of CdkDropLists pierced by Z axis of X,Y marked by pointer position, choose one with the smallest area (the 'youngest') and make the rest 'non responsive' to current drag.
answered Jan 10 at 22:16
BrachaczBrachacz
512
512
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
add a comment |
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
Yeah it's definitely clunky. The can drop predicate gets called often enough that you can find your way into the smaller list eventually, it's a pain though. When I get the chance I might split this into a seperate repo and maybe as a community we can get to a better implementation
– anewtonlevey
Jan 10 at 22:57
add a comment |
I did manage to find a solution to this, although it's definitely hacky and involves accessing a private value with the Angular drag and drop CDK.
I use the cdkDropListEnterPredicate function to check which list it should be trying to drop into, which i assign the canDropPredicate function.
I'm also forced to get access to the pointer position via: _pointerPositionAtLastDirectionChange which isn't great as not all the values I'd like to see passed into the cdkDropListEnterPredicate get passed.
canDropPredicate(): Function
const me = this;
return (drag: CdkDrag<ResourceNode>, drop: CdkDropList<ResourceNode>): boolean =>
const fromBounds = drag.dropContainer.element.nativeElement.getBoundingClientRect();
const toBounds = drop.element.nativeElement.getBoundingClientRect();
if (!me.intersect(fromBounds, toBounds))
return true;
// This gross but allows us to access a private field for now.
const pointerPosition: Point = drag['_dragRef']['_pointerPositionAtLastDirectionChange'];
// They Intersect with each other so we need to do some calculations here.
if (me.insideOf(fromBounds, toBounds))
return !me.pointInsideOf(pointerPosition, fromBounds);
if (me.insideOf(toBounds, fromBounds) && me.pointInsideOf(pointerPosition, toBounds))
return true;
return false;
;
intersect(r1: DOMRect | ClientRect, r2: DOMRect | ClientRect): boolean
r2.top > r1.bottom
insideOf(innerRect: DOMRect | ClientRect, outerRect: DOMRect | ClientRect): boolean
return innerRect.left >= outerRect.left &&
innerRect.right <= outerRect.right &&
innerRect.top >= outerRect.top &&
innerRect.bottom <= outerRect.bottom &&
!(
innerRect.left === outerRect.left &&
innerRect.right === outerRect.right &&
innerRect.top === outerRect.top &&
innerRect.bottom === outerRect.bottom
);
pointInsideOf(position: Point, rect: DOMRect | ClientRect)
return position.x >= rect.left &&
position.x <= rect.right &&
position.y >= rect.top &&
position.y <= rect.bottom;
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
add a comment |
I did manage to find a solution to this, although it's definitely hacky and involves accessing a private value with the Angular drag and drop CDK.
I use the cdkDropListEnterPredicate function to check which list it should be trying to drop into, which i assign the canDropPredicate function.
I'm also forced to get access to the pointer position via: _pointerPositionAtLastDirectionChange which isn't great as not all the values I'd like to see passed into the cdkDropListEnterPredicate get passed.
canDropPredicate(): Function
const me = this;
return (drag: CdkDrag<ResourceNode>, drop: CdkDropList<ResourceNode>): boolean =>
const fromBounds = drag.dropContainer.element.nativeElement.getBoundingClientRect();
const toBounds = drop.element.nativeElement.getBoundingClientRect();
if (!me.intersect(fromBounds, toBounds))
return true;
// This gross but allows us to access a private field for now.
const pointerPosition: Point = drag['_dragRef']['_pointerPositionAtLastDirectionChange'];
// They Intersect with each other so we need to do some calculations here.
if (me.insideOf(fromBounds, toBounds))
return !me.pointInsideOf(pointerPosition, fromBounds);
if (me.insideOf(toBounds, fromBounds) && me.pointInsideOf(pointerPosition, toBounds))
return true;
return false;
;
intersect(r1: DOMRect | ClientRect, r2: DOMRect | ClientRect): boolean
r2.top > r1.bottom
insideOf(innerRect: DOMRect | ClientRect, outerRect: DOMRect | ClientRect): boolean
return innerRect.left >= outerRect.left &&
innerRect.right <= outerRect.right &&
innerRect.top >= outerRect.top &&
innerRect.bottom <= outerRect.bottom &&
!(
innerRect.left === outerRect.left &&
innerRect.right === outerRect.right &&
innerRect.top === outerRect.top &&
innerRect.bottom === outerRect.bottom
);
pointInsideOf(position: Point, rect: DOMRect | ClientRect)
return position.x >= rect.left &&
position.x <= rect.right &&
position.y >= rect.top &&
position.y <= rect.bottom;
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
add a comment |
I did manage to find a solution to this, although it's definitely hacky and involves accessing a private value with the Angular drag and drop CDK.
I use the cdkDropListEnterPredicate function to check which list it should be trying to drop into, which i assign the canDropPredicate function.
I'm also forced to get access to the pointer position via: _pointerPositionAtLastDirectionChange which isn't great as not all the values I'd like to see passed into the cdkDropListEnterPredicate get passed.
canDropPredicate(): Function
const me = this;
return (drag: CdkDrag<ResourceNode>, drop: CdkDropList<ResourceNode>): boolean =>
const fromBounds = drag.dropContainer.element.nativeElement.getBoundingClientRect();
const toBounds = drop.element.nativeElement.getBoundingClientRect();
if (!me.intersect(fromBounds, toBounds))
return true;
// This gross but allows us to access a private field for now.
const pointerPosition: Point = drag['_dragRef']['_pointerPositionAtLastDirectionChange'];
// They Intersect with each other so we need to do some calculations here.
if (me.insideOf(fromBounds, toBounds))
return !me.pointInsideOf(pointerPosition, fromBounds);
if (me.insideOf(toBounds, fromBounds) && me.pointInsideOf(pointerPosition, toBounds))
return true;
return false;
;
intersect(r1: DOMRect | ClientRect, r2: DOMRect | ClientRect): boolean
r2.top > r1.bottom
insideOf(innerRect: DOMRect | ClientRect, outerRect: DOMRect | ClientRect): boolean
return innerRect.left >= outerRect.left &&
innerRect.right <= outerRect.right &&
innerRect.top >= outerRect.top &&
innerRect.bottom <= outerRect.bottom &&
!(
innerRect.left === outerRect.left &&
innerRect.right === outerRect.right &&
innerRect.top === outerRect.top &&
innerRect.bottom === outerRect.bottom
);
pointInsideOf(position: Point, rect: DOMRect | ClientRect)
return position.x >= rect.left &&
position.x <= rect.right &&
position.y >= rect.top &&
position.y <= rect.bottom;
I did manage to find a solution to this, although it's definitely hacky and involves accessing a private value with the Angular drag and drop CDK.
I use the cdkDropListEnterPredicate function to check which list it should be trying to drop into, which i assign the canDropPredicate function.
I'm also forced to get access to the pointer position via: _pointerPositionAtLastDirectionChange which isn't great as not all the values I'd like to see passed into the cdkDropListEnterPredicate get passed.
canDropPredicate(): Function
const me = this;
return (drag: CdkDrag<ResourceNode>, drop: CdkDropList<ResourceNode>): boolean =>
const fromBounds = drag.dropContainer.element.nativeElement.getBoundingClientRect();
const toBounds = drop.element.nativeElement.getBoundingClientRect();
if (!me.intersect(fromBounds, toBounds))
return true;
// This gross but allows us to access a private field for now.
const pointerPosition: Point = drag['_dragRef']['_pointerPositionAtLastDirectionChange'];
// They Intersect with each other so we need to do some calculations here.
if (me.insideOf(fromBounds, toBounds))
return !me.pointInsideOf(pointerPosition, fromBounds);
if (me.insideOf(toBounds, fromBounds) && me.pointInsideOf(pointerPosition, toBounds))
return true;
return false;
;
intersect(r1: DOMRect | ClientRect, r2: DOMRect | ClientRect): boolean
r2.top > r1.bottom
insideOf(innerRect: DOMRect | ClientRect, outerRect: DOMRect | ClientRect): boolean
return innerRect.left >= outerRect.left &&
innerRect.right <= outerRect.right &&
innerRect.top >= outerRect.top &&
innerRect.bottom <= outerRect.bottom &&
!(
innerRect.left === outerRect.left &&
innerRect.right === outerRect.right &&
innerRect.top === outerRect.top &&
innerRect.bottom === outerRect.bottom
);
pointInsideOf(position: Point, rect: DOMRect | ClientRect)
return position.x >= rect.left &&
position.x <= rect.right &&
position.y >= rect.top &&
position.y <= rect.bottom;
edited Jan 3 at 10:59
Timo
185
185
answered Nov 13 '18 at 2:20
anewtonleveyanewtonlevey
558
558
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
add a comment |
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
you extend the component?
– junk
Nov 13 '18 at 2:29
you extend the component?
– junk
Nov 13 '18 at 2:29
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
This is within my tree component (No relation to the Angular Tree component) and I set the cdkDropListEnterPredicate to canDropPredicate
– anewtonlevey
Nov 13 '18 at 2:36
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
@anewtonlevey is there any progress regarding nested lists? would you like to share a stackblitz?
– Andre Elrico
Dec 7 '18 at 14:09
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
Doesn't work? How would setting the canDropPredicate do anything for nested lists?
– Man Personson
Jan 9 at 17:41
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
canDropPredicate normally just returns true, so by checking the intersection I can determine that we can drop into the inner list and return false for the outer list.
– anewtonlevey
Jan 10 at 22:50
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53271834%2fnested-drag-and-drop-in-with-angular-7-material-cdk%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think material's drag and drop still have many features need to do.may be you could search in official github issues.
– junk
Nov 13 '18 at 1:49
@junk I did manage to get this working, although i'm sure as Material's drag and drop CDK evolves so will the solution.
– anewtonlevey
Nov 13 '18 at 2:22