You need to sign in to do that
Don't have an account?
Tapasvini Makvana
Submenu creation in lightning Components
Hi,
I want to create a submenu using the lightning component.using existing ui:menu component we can create menu but i need to create submenu of menuitem. Can anyone help me how can i achieve it??
Thanks in advance..
I want to create a submenu using the lightning component.using existing ui:menu component we can create menu but i need to create submenu of menuitem. Can anyone help me how can i achieve it??
Thanks in advance..
As per your requirement, you can use the below code to create submenu in the lightning component:
<ui:menu>
<ui:menuTriggerLink label="My Favourite Pie"/>
<ui:menuList>
<ui:actionMenuItem aura:id="item1" label="Chicken and Mushroom"/>
<ui:actionMenuItem aura:id="item2" label="Steak and Ale"/>
<ui:actionMenuItem aura:id="item3" label="Cheese and Onion"/>
</ui:menuList>
</ui:menu>
For more detail refer to these links:
https://www.lightningdesignsystem.com/components/menus/
https://salesforce.stackexchange.com/questions/228529/submenu-inside-lightningbuttonmenu-component?rq=1
https://salesforce.stackexchange.com/questions/142549/how-to-close-slds-dropdown-menu-when-clicked-outside-in-lightning-component
I hope this solution will help you. Please mark it as best answers if it helps.
Thanks.
Deepali Kulshrestha