diff --git a/src/app/app.main.component.ts b/src/app/app.main.component.ts index 5c7cd60..3832599 100644 --- a/src/app/app.main.component.ts +++ b/src/app/app.main.component.ts @@ -99,6 +99,7 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { } else { this.menuActiveMobile = !this.menuActiveMobile; + this.topMenuActive = false; } event.preventDefault(); @@ -127,7 +128,7 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { setTimeout(() => { this.topMenuActive = false; this.topMenuLeaving = false; - }, 500); + }, 1); } onMenuClick() { @@ -155,6 +156,10 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { return window.innerWidth > 1024; } + isMobile(){ + return window.innerWidth < 1024; + } + onSearchClick() { this.topMenuButtonClick = true; } diff --git a/src/app/app.menu.component.ts b/src/app/app.menu.component.ts index 67ee72a..dbaff1b 100644 --- a/src/app/app.menu.component.ts +++ b/src/app/app.menu.component.ts @@ -12,7 +12,7 @@ import {AppComponent} from './app.component';
- + @@ -41,7 +41,7 @@ export class AppMenuComponent implements OnInit { {label: 'Form Layout', icon: 'pi pi-fw pi-id-card', routerLink: ['/uikit/formlayout']}, {label: 'Input', icon: 'pi pi-fw pi-check-square', routerLink: ['/uikit/input']}, {label: 'Float Label', icon: 'pi pi-fw pi-bookmark', routerLink: ['/uikit/floatlabel']}, - {label: 'Invalid State', icon: 'pi pi-exclamation-circle', routerLink: ['/uikit/invalidstate']}, + {label: 'Invalid State', icon: 'pi pi-fw pi-exclamation-circle', routerLink: ['/uikit/invalidstate']}, {label: 'Button', icon: 'pi pi-fw pi-mobile', routerLink: ['/uikit/button'], class: 'rotated-icon'}, {label: 'Table', icon: 'pi pi-fw pi-table', routerLink: ['/uikit/table']}, {label: 'List', icon: 'pi pi-fw pi-list', routerLink: ['/uikit/list']}, @@ -67,38 +67,38 @@ export class AppMenuComponent implements OnInit { label: 'Hierarchy', items: [ { - label: 'Submenu 1', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', items: [ { - label: 'Submenu 1.1', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', items: [ - {label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-align-left'}, - {label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-align-left'}, - {label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-align-left'}, + {label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark'}, + {label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark'}, + {label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark'}, ] }, { - label: 'Submenu 1.2', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', items: [ - {label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-align-left'} + {label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark'} ] }, ] }, { - label: 'Submenu 2', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', items: [ { - label: 'Submenu 2.1', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', items: [ - {label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-align-left'}, - {label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-align-left'}, + {label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark'}, + {label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark'}, ] }, { - label: 'Submenu 2.2', icon: 'pi pi-fw pi-align-left', + label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', items: [ - {label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-align-left'}, + {label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark'}, ] }, ] diff --git a/src/app/app.menu.service.ts b/src/app/app.menu.service.ts index d209192..0163ecf 100644 --- a/src/app/app.menu.service.ts +++ b/src/app/app.menu.service.ts @@ -15,6 +15,6 @@ export class MenuService { } reset() { - // this.resetSource.next(); + // this.resetSource.next(true); } } diff --git a/src/app/app.menuitem.component.ts b/src/app/app.menuitem.component.ts index 31db832..d690171 100644 --- a/src/app/app.menuitem.component.ts +++ b/src/app/app.menuitem.component.ts @@ -18,7 +18,7 @@ import {AppMainComponent} from './app.main.component'; {{item.label}} - + {{item.label}} - +