Skip to content

Small issue with nested dropDown() menu entries #577

Description

@tfonrouge

Hi,

I have a small issue using nested kvision's dropDown().

Using the following sample code:

        root("kvapp") {
            navbar(collapseOnClick = true) {
                dropDown(text = "Option 1", forNavbar = true) {
                    dropDown(text = "1st Sub menu", forDropDown = true, autoClose = AutoClose.OUTSIDE) {
                        ddLink("Menu item")
                        ddLink("Menu item")
                        dropDown(text = "2nd Dropdown", forDropDown = true) {
                            ddLink("Menu item")
                            ddLink("Menu item")
                            ddLink("Menu item")
                        }
                    }
                    separator()
                    dropDown(text = "2nd Sub menu", forDropDown = true, autoClose = AutoClose.OUTSIDE) {
                        onEventLaunch("show.bs.dropdown") {
                            console.warn("change 2")
                        }
                        ddLink("Sub menu 2.1")
                        ddLink("Sub menu 2.2")
                        ddLink("Sub menu 2.3")
                    }
                }
            }
        }

If I click the 1st sub menu entry I get:

Image

and when I click the second sub menu entry I get:

Image

So, it seems that the first sub menu entry is not closed when the second sub menu entry is selected, seems that the event action is not propagated when the second menu is clicked and the 1st menu entry doesn't close.

Any help or insight will be greatly appreciated !

Thanks in advance,

Teo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions