Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to provide mixed orientation to Angular Material drag e drop v10

I am using Material drag e drop they don't allow the mixed-orientation of the drag e drop so to use it with both directions I use this workaround.

But in the last release, they removed CdkDropList.enter method.

So now how can I achieve the same result as before?

like image 263
Alessandro Celeghin Avatar asked Dec 19 '25 04:12

Alessandro Celeghin


1 Answers

Here the solution: https://github.com/angular/components/issues/13372#issuecomment-664067103

this is the new code from angular 9 version:

this.source._dropListRef.start();
this.placeholder._dropListRef.enter(drag._dragRef, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
like image 179
Alessandro Celeghin Avatar answered Dec 24 '25 10:12

Alessandro Celeghin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!