When I click any sub menu then it will collapse the Submenu of any menu . It should be open after click

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
nazrulcsebd
Posts: 13
Joined: 12 Mar 2018, 03:45

02 Apr 2022, 04:22

I added a submenu under a menu. But when I click the submenu item it will collapse. But the default character should be not collapsed the submenu.
Please solve the submenu problem of the static menu.

the screen snap is given below

http://educare.maimra.com/images/menu-c ... ubmenu.png

http://educare.maimra.com/images/menu-s ... roblem.png

public static MenuSubMenues = [
{
label: RoutesPath.Accounts.AccountsManagement.Title, icon: 'pi pi-fw pi-users', routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}`],
items: [
{ label: RoutesPath.Accounts.AccountChart.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.AccountChart.Path}`] },
{ label: RoutesPath.Accounts.AccountChartTree.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.AccountChartTree.Path}`] },
{ label: RoutesPath.Accounts.VoucherEntry.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.VoucherEntry.Path}`] },
{ label: RoutesPath.Accounts.VoucherSearch.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.VoucherSearch.Path}`] },

{
label: RoutesPath.Accounts.Reports.Title,
items: [
{ label: RoutesPath.Accounts.GeneralLedger.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.GeneralLedger.Path}`] },
{ label: RoutesPath.Accounts.TrialBalance.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.TrialBalance.Path}`] },
{ label: RoutesPath.Accounts.ProfitLossStatement.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.ProfitLossStatement.Path}`] },
{ label: RoutesPath.Accounts.BalanceSheet.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.BalanceSheet.Path}`] },
{ label: RoutesPath.Accounts.CashFlowStatement.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.CashFlowStatement.Path}`] },
{ label: RoutesPath.Accounts.AccountsSummary.Title, routerLink: [`/${RoutesPath.Accounts.AccountsManagement.Path}/${RoutesPath.Accounts.AccountsSummary.Path}`] }
]
},

]
}
]

cetincakiroglu
Posts: 130
Joined: 17 Dec 2021, 09:33

08 Apr 2022, 16:35

Hi,

All Prime Templates have it as the default behavior in their menus. We only provide a logic to track the active route-menu item relationship. The menu item stays open if it's activated and has a routerlink. The rest is up to you and you need to implement your custom logic to make it behave as you wish.

Regards.

Post Reply

Return to “California - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests