akveo / akveo/nebular

Nebular menu click automatically scrolls to top and closing expanded menu

Open
#2,786 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I have created dynamic list of menu with nbMenuService in nebular sidebar.

menu: NbMenuItem[]
this.menu = [
{
title: "Menu1",
icon: "nb-person",
children: [
{
title: "SubMenu1",
link: "/pages/forms/Sub-Menu1"
},
{
title: "SubMenu2",
link: "/pages/forms/Sub-Menu2"
}
],
"hidden" : this.available_groups.some(v => ['Admin'].includes(v)) ? false : true

this.nbMenuService.addItems(this.menu)

After loading menu list in sidebar, on click of menu it's closing already expanded menus and scrollbar of side menu scrolls to top. Seems on click of menu each time page.component is getting refreshed or hitting the page module again. Can someone guide me what's the issue with my code . Thanks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.