Dynamically look for connected drop lists with Angular CDK drag and drop

1.1k Views Asked by At

I have an HTML element with a mouseenter listener that shows a hidden cdk drop list on mouseenter (with *ngIf). When on drag start of a cdk drag item, I'm getting the warning CdkDropList could not find connected drop list with id "xxxx".

This is most likely because the hidden drop list doesn't exist in the DOM yet. I would like to know if there's a way to dynamically look for droplists in the DOM, so when dragging over my element, it picks up the hidden droplist and allows me to drag and drop there.

0

There are 0 best solutions below