diff --git a/core/src/navigation/LeftNav.svelte b/core/src/navigation/LeftNav.svelte index ba00126c2f..5e4226818f 100644 --- a/core/src/navigation/LeftNav.svelte +++ b/core/src/navigation/LeftNav.svelte @@ -160,6 +160,7 @@ GenericHelpers.requestExperimentalFeature('btpToolLayout', false); let btpNavTopCnt; let toolLayoutSubCatDelimiter = LuigiConfig.getConfigValue('settings.btpToolLayout.subCategoryDelimiter') || '::'; + let navHeaderContainer; const getNodeLabel = node => { return NavigationHelpers.getNodeLabel(node); @@ -248,6 +249,22 @@ } }; + const handleNavHeaderRenderer = () => { + const clickHandler = node => { + if (node) { + handleClick(node); + } + }; + + if (navHeader?.renderer && navHeaderContainer) { + if (navHeader.clearBeforeRender) { + navHeaderContainer.innerHTML = ''; + } + + navHeader.renderer(navHeaderContainer, navParentNode, clickHandler); + } + }; + afterUpdate(() => { if (!window.Luigi.__btpNavTopCntRszObs) { let updateTimeout; @@ -269,6 +286,7 @@ } else { resetNavEntries(); } + handleNavHeaderRenderer(); }); beforeUpdate(() => { @@ -589,35 +607,37 @@ style="width: var(--luigi__left-sidenav--width); height: 100%;" > {#if navHeader} -