Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CdkDropList enter deprecated not exists in CdkDropList

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

like image 861
Atlas91 Avatar asked Jul 30 '20 08:07

Atlas91


1 Answers

I had the same problem, and fixed it with:

this.placeholder._dropListRef.enter(drag._dragRef, 
drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
like image 173
Jasper Avatar answered Oct 16 '22 08:10

Jasper