Skip to content

Clicking on child item within sub-menu triggers parent's callback #25

Description

@nav-mohan
<Dropdown title='Dropdown title' position="right">
  {Object.keys(_g_lineage_tree).map(parent_lh=>
      <Dropdown.Item position="right" key={parent_lh} onClick={(e)=>console.log(parent_lh)}>
          {parent_lh}
          <Dropdown.Submenu position="right">
              {_g_lineage_tree[parent_lh].map(child_lh=>
                  <Dropdown.Item position="right" key={child_lh} onClick={(e)=>console.log(child_lh)}>
                  {child_lh}
                  </Dropdown.Item>
              )}
          </Dropdown.Submenu>
      </Dropdown.Item>
  )}
</Dropdown>

_g_lineage_tree is a JSON object containing the menu and sub-menu names.
When I click on a sub-menu item it triggers the menu (parent) callback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions