@@ -52,20 +52,23 @@ import { IconDirective } from '@coreui/icons-angular';
52
52
] ,
53
53
animations : [
54
54
trigger ( 'openClose' , [
55
- state ( 'open' , style ( {
56
- height : '*'
57
- } ) ) ,
58
- state ( 'closed' , style ( {
59
- height : '0px'
60
- } ) ) ,
61
- transition ( 'open <=> closed' , [
62
- animate ( '.15s ease' )
63
- ] )
55
+ state (
56
+ 'open' ,
57
+ style ( {
58
+ height : '*'
59
+ } )
60
+ ) ,
61
+ state (
62
+ 'closed' ,
63
+ style ( {
64
+ height : '0px'
65
+ } )
66
+ ) ,
67
+ transition ( 'open <=> closed' , [ animate ( '.15s ease' ) ] )
64
68
] )
65
69
]
66
70
} )
67
71
export class SidebarNavGroupComponent implements OnInit , OnDestroy {
68
-
69
72
constructor (
70
73
private router : Router ,
71
74
private renderer : Renderer2 ,
@@ -102,7 +105,6 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
102
105
public display : any = { display : 'block' } ;
103
106
104
107
ngOnInit ( ) : void {
105
-
106
108
this . navItems = [ ...this . item . children ] ;
107
109
108
110
this . navSubscription = this . navigationEndObservable . subscribe ( ( event : NavigationEnd ) => {
@@ -116,7 +118,7 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
116
118
this . openGroup ( true ) ;
117
119
}
118
120
119
- this . navGroupSubscription = this . sidebarNavGroupService . sidebarNavGroupState$ . subscribe ( next => {
121
+ this . navGroupSubscription = this . sidebarNavGroupService . sidebarNavGroupState$ . subscribe ( ( next ) => {
120
122
if ( this . dropdownMode === 'close' && next . sidebarNavGroup && next . sidebarNavGroup !== this ) {
121
123
if ( next . sidebarNavGroup . item . url . startsWith ( this . item . url ) ) {
122
124
return ;
@@ -194,15 +196,14 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
194
196
]
195
197
} )
196
198
export class SidebarNavComponent implements OnChanges {
197
-
198
199
constructor (
199
200
@Optional ( ) public sidebar : SidebarComponent ,
200
201
public helper : SidebarNavHelper ,
201
202
public router : Router ,
202
203
private renderer : Renderer2 ,
203
204
private hostElement : ElementRef ,
204
205
private sidebarService : SidebarService
205
- ) { }
206
+ ) { }
206
207
207
208
@Input ( ) navItems ?: INavData [ ] = [ ] ;
208
209
@Input ( ) dropdownMode : 'path' | 'none' | 'close' = 'path' ;
@@ -223,7 +224,9 @@ export class SidebarNavComponent implements OnChanges {
223
224
// return !!this.groupItems;
224
225
// }
225
226
226
- @HostBinding ( 'attr.role' ) role = 'nav' ;
227
+ @HostBinding ( 'attr.role' )
228
+ @Input ( )
229
+ role = 'navigation' ;
227
230
228
231
public navItemsArray : INavData [ ] = [ ] ;
229
232
0 commit comments