Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
@nnixaa I am subscribing to onItemClick then logout from the logout menu item is selected.
this.menuService.onItemClick()
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe(item => {
if (item.item.title === this.logoutMenuItem.title) {
this.logout();
}
});
it successfully logs but on login again the onItemClick is triggered therefore logs out
user immediately. That's because from the code the clicked items are stored in ReplaySubject
const itemClick$ = new ReplaySubject<NbMenuBag>(1);
Expected behavior:
i want on logout the ReplaySubject cache to be cleared out.
Steps to reproduce:
May be add an option to pass a null value as the last clicked item, so that the user has
an option to pass null menu item. so when the subscription picks up the replay it won't do anything.
Related code:
Other information:
Angular, Nebular
"@nebular/theme": "^2.0.0-rc.9"
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
@nnixaa I am subscribing to
onItemClickthen logout from the logout menu item is selected.it successfully logs but on login again the
onItemClickis triggered therefore logs outuser immediately. That's because from the code the clicked items are stored in
ReplaySubjectExpected behavior:
i want on logout the
ReplaySubjectcache to be cleared out.Steps to reproduce:
May be add an option to pass a null value as the last clicked item, so that the user has
an option to pass null menu item. so when the subscription picks up the replay it won't do anything.
Related code:
Other information:
Angular, Nebular