0

I am working on diamond-react theme of primereact and I have customized the menu. I want to expand the menu item default or conditionally. I tried with below expanded property as per documentation but it didn't worked for me:

 {
     label: "Email", icon: "pi pi-fw pi-inbox",
     items: [
         {
             label: "My Email", icon: "pi pi-fw pi-inbox", to: '/email'
         },  
         {
             label: "Company Emails", icon: "pi pi-fw pi-inbox", to: '/company-email',
         },  
     ],  
     expanded:true,
},

Other Properties like visible: true is working fine.

Vaibhav Gidde
  • 740
  • 7
  • 13
  • Why not have a similar state like flag that determines whether the menu is expanded or not. The default state for that should be true. – Uchechukwu Nwafor Oct 05 '21 at 08:24
  • @UchechukwuNwafor Yes we can use the same but the issue is not about flag, expanded property is not working. – Vaibhav Gidde Oct 05 '21 at 09:16
  • Yeah I know flag has nothing to do with this. I was just suggesting that to create a similar state that would act like that to toggle the `expanded` property. But since you said the expanded property is not working, you could maybe open an issue to them – Uchechukwu Nwafor Oct 05 '21 at 09:19

0 Answers0