Don't close menu item on click

UI Components for React
Post Reply
jalbers
Posts: 1
Joined: 10 Oct 2019, 18:01

10 Oct 2019, 18:05

I'm using the Menubar component. When I click a menu item and run the command I want the dropdown to stay expanded. How can I do this?

Code: Select all

...
	{
     label:'Edit',
     icon:'pi pi-fw pi-pencil',
     items:[
        {
           label:'Left',
           icon:'pi pi-fw pi-align-left',
           command: (e) => {
            // do something
            // don't close menu
          }
        },
         ...
        
        <Menubar model={items} />

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 4 guests