1
0
Fork 0

Revert user-menu dropdown active class on sub-menu and autoclose only on outside click

This commit is contained in:
kimsible 2020-07-29 19:07:03 +02:00 committed by Chocobozzz
parent 30814423ae
commit 837fe4f3fb

View file

@ -4,12 +4,8 @@
<a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a>
<div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry"
#dropdown="ngbDropdown" autoClose="outside">
#dropdown="ngbDropdown" autoClose="true">
<span
*ngIf="isInSmallView"
tabindex=0
[ngClass]="{ active: !!suffixLabels[menuEntry.label] }"
(click)="openModal(id)" (keydown.enter)="openModal(id)"
role="button" class="title-page title-page-settings">
<ng-container i18n>{{ menuEntry.label }}</ng-container>
</span>
@ -27,7 +23,7 @@
<div ngbDropdownMenu>
<ng-container *ngFor="let menuChild of menuEntry.children">
<a *ngIf="isDisplayed(menuChild)" class="dropdown-item"
[ngClass]="{ icon: hasIcons, active: suffixLabels[menuEntry.label] === menuChild.label }"
[ngClass]="{ icon: hasIcons }"
[routerLink]="menuChild.routerLink">
<my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>