Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class="dragula-template"
cdkDropList
[cdkDropListData]="menuTemplate.items"
[cdkDropListConnectedTo]="['actualMenuList']"
[cdkDropListConnectedTo]="['actualMenuList'].concat(connectedDropdownIds)"
id="mainMenu"
>
<app-navigation-menu-template-item
Expand Down Expand Up @@ -98,6 +98,7 @@
<div
class="dropdownBody"
cdkDropList
[id]="getDropdownId(firstLevelIndex)"
[cdkDropListData]="menuItem.children"
[cdkDropListConnectedTo]="['mainMenu']"
(cdkDropListDropped)="dropMenuItemChild($event, firstLevelIndex)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ export class NavigationMenuPageComponent implements OnInit, OnDestroy {
return NavigationMenuItemTypeEnum;
}

getDropdownId(index: number): string {
return `dropdown-${index}`;
}

get connectedDropdownIds(): string[] {
return this.navigationMenuModel.actualMenu
.map((item, index) => item.type === NavigationMenuItemTypeEnum.Dropdown ? this.getDropdownId(index) : null)
.filter(id => id !== null) as string[];
}

constructor() {
}

Expand Down
Loading