Skip to content

Commit

Permalink
Dev UI: External links should not be a tab in the sub-menu
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger committed Jun 14, 2023
1 parent 6563ae6 commit 4e5a52a
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ export class QwcHeader extends observeState(LitElement) {
if(subMenu){
this._rightSideNav = html`<vaadin-tabs selected="${subMenu.index}">
${subMenu.links.map(link =>
html`<vaadin-tab>
${this._renderSubMenuLink(link)}
</vaadin-tab>`
html`${this._renderTab(subMenu.index, link)}`
)}
</vaadin-tabs>`;
}else{
Expand All @@ -251,7 +249,19 @@ export class QwcHeader extends observeState(LitElement) {
}
}

_renderSubMenuLink(link){
_renderTab(index, link){
if(!link.page.embed && link.page.includeInSubMenu){
return html`
${this._renderSubMenuLink(index, link)}
`;
}else{
return html`<vaadin-tab>
${this._renderSubMenuLink(index, link)}
</vaadin-tab>`;
}
}

_renderSubMenuLink(index, link){

let relativePath = link.page.id.replace(link.page.namespace + "/", "");

Expand Down

0 comments on commit 4e5a52a

Please sign in to comment.