Foundation Theme Dropdown menus

Foundation Theme Dropdown menus

bfarkasbfarkas Posts: 181Questions: 48Answers: 0

Anyone using the foundation theme and have dropdown menus in the buttons area?
They stay open after you click on choices and stay over the top of modals launched until you purposefully click elsewhere, kind of annoying. Anyone found a work around?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    edited September 2020

    foundation theme and have dropdown menus in the buttons area?

    Are these Datatable drop down menus or something you created? If something you created do they work properly outside of the Datatables area?

    The length menu drop down works in this example.

    Sounds like the problem is specific to your page. Can you post a link to your page or a test case replicating the issue so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    It is the default behaviors of the buttons made by datatables using the foundation theme.
    Here is a current versions:
    https://newyorklife.acms.com/p5t215g7fd33/

    If you click one of the dropdowns, and pick something that triggers a modal, i.e. export > remove all or nest > personalize your nests

    You'll see how the menu stays open and top level until you click someplace else on the screen rather than closing after selecting a menu item as expected.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Thanks for the clarification. I'm seeing that on your site as well. I'll take a look at that and report back tomorrow :-)

    Allan

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    Thanks!!

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Just been looking into this and I see you are using the collection button, but not specifying the autoClose option. By default that will be false, so if you want the because you are looking for, add:

    autoClose: true
    

    to your collection button.

    Allan

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    Ah! Yes!
    I thought I was going nuts trying to figure that out.
    I think I found collections on a buttons example page and never looked at the collection document. I need to get better at looking at the available options for a given parameter, this is the third time this week something like that happened.

    Thanks greatly!!
    Brian

This discussion has been closed.