Reputation: 5904
After doing the update to Angular Material 10 I got a problem with drag&drop directive. enter
, in cdkDropList
doesn't exists anymore and so my code
this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
not working. I tried to find out a solution but without success. That's an example with the deprecated enter
function https://stackblitz.com/edit/angular-dragdrop-grid-pnyded
can anyone help me to fix this? Thanks a lot
Upvotes: 18
Views: 7316
Reputation: 619
I had the same problem, and fixed it with:
this.placeholder._dropListRef.enter(drag._dragRef,
drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
Upvotes: 38