Page 1 of 1

Change order of spans PanelMenu

Posted: 10 Jul 2018, 23:07
by silvanomatta
Hello everyone.

I would like to know if it is possible to change the order of the spans of the menu panel.
for example.

First - the text label
second arrow
Third - Icon

Thank you

Re: Change order of spans PanelMenu

Posted: 13 Nov 2020, 02:25
by andrielson
Hi,

Yes, it is possible.

In PrimeNG 10, the Panelmenu header uses Flex layout.
So, one can change the order of the items by using the CSS property "order".

Example:

Code: Select all

.p-panelmenu {
       // the chevron (arrow) icon
        .p-panelmenu-icon {
            order: 3; //here we are moving it to last position
            margin-left: auto;
        }
}
Other classes are:
  • p-menuitem-icon
  • p-menuitem-text