design-system-react icon indicating copy to clipboard operation
design-system-react copied to clipboard

Add Submenu support to Dropdown component

Open garygong opened this issue 5 years ago • 3 comments

Add submenu support to the Dropdown component according to the spec: https://lightningdesignsystem.com/components/menus/#With-a-Submenu

Here's a proposal for how to represent submenu items:

Untitled
[
    {
        "id": "1",
        "label": "Menu Item One",
        "type": "item",
        "value": "1"
    },
    {
        "id": "2",
        "label": "Menu Item Two",
        "type": "item",
        "value": "2"
    },
    {
        "id": "3",
        "label": "Menu Item Three",
        "type": "item",
        "value": "3",
        "options": [
            {
                "id": "3-1",
                "label": "Submenu Item One",
                "type": "item",
                "value": "3-1"
            },
            {
                "id": "3-2",
                "label": "Submenu Item Two",
                "type": "item",
                "value": "3-2"
            },
            {
                "id": "3-3",
                "label": "Submenu Item Three",
                "type": "item",
                "value": "3-3"
            },
            {
                "type": "divider"
            },
            {
                "id": "3-4",
                "label": "Submenu Item Four",
                "type": "item",
                "value": "3-4"
            }
        ]
    }
]

garygong avatar Jul 24 '20 21:07 garygong

This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.

stale[bot] avatar Nov 01 '20 07:11 stale[bot]

This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.

stale[bot] avatar Apr 19 '22 01:04 stale[bot]

This would be great to have. I don't think this should be closed.

praneetloke avatar May 05 '22 22:05 praneetloke