Skip to content

Nested Dropdown closes parent #802

Closed
@slubowsky

Description

@slubowsky

I want to have nested dropdowns. Right now this doesn't seem to work because DropdownService (in DropdownService.open) ensures that only one dropdown can be open at a time - even if I set the outer one to autoclose=disabled. Clicking on the nested sub dropdown to open it, causes the parent dropdown to close which of course makes this one not visible too.

I attempted to prevent the service from getting the event by binding to click and calling event.preventDefault() and event.stopPropagation() on my button with the dropdownToggle directive but that doesn't seem to be preventing the event from reaching the service. Even handling isOpen myself and not using the dropdownToggle directive at all doesnt help since at the end of the day DropdownService.open gets called.

Can the service be made to not close other dropdowns that are set to autoclose=disabled or am I perhaps just not going about this correctly?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions