Open
Description
Hello. I have a NbMenu that was working fine.
<nb-menu [items]="menu" tag="menu"></nb-menu>
Now I've added a HostListener in my app.component for user clicks detection and send a resfresh token request:
@HostListener('document:click', ['$event'])
documentClick(event: MouseEvent) {
// your click logic
// console.log('clicked');
this.authService.getToken().subscribe((token: NbAuthJWTToken) => {
if (token) {
if (!token.isValid()) {
this.authService.logout('email');
} else {
this.authService.refreshToken('email', token).subscribe((result: NbAuthResult) => {});
}
}
});
}
Now my menu glitches. When I click on a collapsable menu it open and close again, not being able to click on the submenu items.
Thanks for any help.