From bfbe598bddd3226e1adfc9da50f2a4bc307f15f2 Mon Sep 17 00:00:00 2001 From: Yura Bondarenko Date: Fri, 26 Feb 2021 15:25:00 +0100 Subject: [PATCH] TESTING: sectionID argument to debug getComponentForMenu --- src/app/shared/menu/menu-section.decorator.ts | 2 +- src/app/shared/menu/menu.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/menu/menu-section.decorator.ts b/src/app/shared/menu/menu-section.decorator.ts index c27e870e13..241e9cdf6b 100644 --- a/src/app/shared/menu/menu-section.decorator.ts +++ b/src/app/shared/menu/menu-section.decorator.ts @@ -26,6 +26,6 @@ export function rendersSectionForMenu(menuID: MenuID, expandable: boolean) { * @param {boolean} expandable True when the section should be expandable, false when if should not * @returns {GenericConstructor} The constructor of the matching Component */ -export function getComponentForMenu(menuID: MenuID, expandable: boolean) { +export function getComponentForMenu(menuID: MenuID, expandable: boolean, sectionID: string) { return menuComponentMap.get(menuID).get(expandable); } diff --git a/src/app/shared/menu/menu.component.ts b/src/app/shared/menu/menu.component.ts index bc22b254b8..e02753006a 100644 --- a/src/app/shared/menu/menu.component.ts +++ b/src/app/shared/menu/menu.component.ts @@ -164,7 +164,7 @@ export class MenuComponent implements OnInit, OnDestroy { private getSectionComponent(section: MenuSection): Observable> { return this.menuService.hasSubSections(this.menuID, section.id).pipe( map((expandable: boolean) => { - return getComponentForMenu(this.menuID, expandable); + return getComponentForMenu(this.menuID, expandable, section.id); } ), );