How to drag and drop from mat-menu or submenu to section. you can check:Stackblitz
HTML Code for Mat-Menu:
<button mat-icon-button [matMenuTriggerFor]="menu">
<mat-icon>add</mat-icon>
</button>
<mat-menu
#menu="matMenu" cdkDropList
[cdkDropListData]="bottomList"
class="bottom-list"
(cdkDropListDropped)="drop($event)"
cdkDropListOrientation="horizontal"
>
<button mat-menu-item *ngFor="let item of bottomList" cdkDrag>
{{ item.name }}
</button>
</mat-menu>
and can you explain why I do this why I compare the object with another object I know always true because of need variables like boolean or number or string?
event.previousContainer === event.container;